Better handling of unexpected Cloudflare API changes.
- Added support for new Cloudflare setting: Speed -> Optimization -> Content Optimization -> Cloudflare Fonts
- When using "Easy config", set "Security level" to "Essentially off" (was set to "Medium" before)
- Easy config enables Cloudflare Fonts
Augh! the new option group wasn't included in the 1.7.2 build (sorry)...
This fixes that.
The presigned URL thing is particularly interesting... a remote storage system like R2 has your server checking user permissions to see if a user can view something, then it makes an API call to fetch the file/object and then passes that through to the user.
- Can use R2 for storage without site being a domain/zone in Cloudflare
- Made change to XenForo's attachment data entity to be more efficient (normally XenForo checks if an attachment exists before making an additional call to actually get it). This will reduce an API call for every attachment view because we don't need to check if the attachment exists (we know it does already because we have a record of it in attachment data).
- Added new option: Use presigned URLs for attachments stored in R2 (allows attachments stored in R2 to be viewed directly by the user, rather than you server needing to download the attachment to pass it through to the user)
As an example, if you have a 10MB attachment, your server first needs to download 10MB and then it sends that 10MB to the end user (so there's the time it takes to download the attachment from R2 and as well as 20MB total bandwidth happening on your server... 10MB in, then 10MB out). With presigned URLs, your server does the permission check and then if the user has permission to view the attachment, the user is redirected to a unique URL that expires in 60 seconds to fetch the attachment. This means attachments are viewed faster for end-users and your server isn't wasting bandwidth passing it through to the user.
Presigned URLs that expire and can't be changed by users is done with cryptographic signing (hence the name, presigned URLs).
Fix for issue when trying to enable guest page caching (ends up in a loop). Only needed if you don't have guest page caching enabled and you want to enable it.
Reorganization of settings moves settings to different categories and created sub-sections within categories. It follows the changes Cloudflare introduced this week so the location of settings in the addon matches where they are in the Cloudflare dashboard. Example:
- Fixed issue where you would get a Call to a member function getBody() on array exception instead of the intended HTTP response if an API call failed twice (it automatically does a retry if it failed once)
- When using guest page caching, decouple the purge cache mechanism from the http request (the purge cache action is sent to XenForo's job system)
- Show egress bandwidth when hovering over R2 class A or class B operation stats
- Reorganized settings to align with Cloudflare's recent dashboard changes
- Remove authentication option for Global API Keys (only allow API Tokens going forward)
- Guest page caching will work properly when a page immediately fires an AJAX request
- Don't try to purge Cloudflare's cache when using guest page caching and an orphaned post is being deleted (when a post is assigned to a thread that doesn't exist)
- Don't include all Zero Trust Access rules in backup (only include rules for your zone/domain)
- Cache Rules included in backup/restore process
- Added check to make sure the site's hostname has at least one dot in it when determining Cloudflare zone ID (things like "localhost" are not valid Cloudflare zones)
- Fetch up to 1,000 R2 buckets per account with API call instead of the default of 20
- If API permissions get revoked on accident, don't throw exception about it on main admin index (admin index won't break if API permissions went away for some reason)
- Better handling of stats rebuilding when rebuilding all stats for the site (from cache rebuild)
- Check if Cloudflare account ID is missing when generating R2 bucket URL and add a server error log if that's the case (if an API token has insufficient permissions, you could end up with a missing account ID, which would in turn make R2 functions not work).
- Backup option works properly again with Firewall rules (forgot to convert that to the new Ruleset API that the firewall uses
- Added check to make sure none of the Cloudflare daily stats are somehow giving a negative number
- Consolidated buttons for new firewall rules into a menu
- Consolidated buttons for new cache rules into a menu
- Stop click propagation when clicking on link to Cloudflare in stats block header (prevents block from hiding/showing when you are just trying to go to Cloudflare dashboard)
- Viewing statistics block on main admin page requires admin permission viewAnalytics (not the permission for managing cloudflare) and block is hidden if the user doesn't have the necessary permission
- Added check to avoid division by zero errors in a case where Cloudflare reports an impossible scenario (cached traffic for a time period, but total traffic for that same time period is 0)
- New option: Show Cloudflare statistics
- Added DMARC management section. Ability to monitor emails being sent by third parties (includes week/month chart as well as table of unapproved sources sending emails)
- Fixed some text not being phrased in the stats block