First of all, this is a big(ish) update...
Large R2 attachments should see the download start much faster for end users (rather than downloading it fully on the server before sending it to user, it's done with streams now). Honestly not sure why I didn't do it that way to begin with, but thanks to @Chris D for pointing out my
stupidity oversight. It's still going to be more performant to be using presigned URLs, so the streaming change is only if you aren't using presigned URLs or token authentication for R2 attachments.
The addon now has the ability to pick up Cloudflare geo-location info for users (or more specifically, HTTP requests). This is something I've been doing for a LONG time with internal addons (in vBulletin 3, vBulletin 4, XF1 and XF2). So this was (mostly) just merging an internal addon I already had into this one.
- If you want this to be done just at the country-level, make sure you enable the IP Geolocation setting for your Cloudflare domain/zone.
- If you want this to be done at the region-level, make sure you enable the Add visitor location headers option for your Cloudflare domain/zone.
- If you don't want to do this at all, disable the Log IP address locations setting under Options -> External service providers.
As far as storing all the extra geo data, it's done as efficiently as possible, with a single record for location data needed for each IP. So even if an IP was logged 1,000 times (and even across multiple users), it only needs to store the geo data once per IP. If you delete/purge IPs, the geo data cleans itself up if there no record of the IP being used any longer in the xf_ip table.
There are a couple new permissions that go along with this to allow user groups to see the country someone posted in a thread/sent a direct message from if you want to allow that.
User group permissions -> Forum permissions -> View country flag on posts
User group permissions -> Direct message permissions -> View country flag on messages
- Updated charting library (Chart.js) to 4.4.7
- Fixed issue where R2 egress bandwidth info for a bucket was reporting class B operations instead of class A operations
- Updated call for attaching custom domain to R2 bucket (endpoint changed)
- Attachment contents passed to view as a stream, rather than a string
- CLI tool to migrate data will ignore files with a prefix of local/
- Made change to CLI migration tool so that the multi-process ability is compatible with new version of Symphony (XF 2.3)
- Added new Cloudflare setting (under Security): AI Bots
- Geo-location functionality
- New option: Admin -> Options -> External service providers -> Log IP address locations
- New permission: View country flag on posts
- New permission: View country flag on messages