[DigitalPoint] App for Cloudflare®

xF2 Add-on [DigitalPoint] App for Cloudflare® 1.8.2

No permission to download
  • 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)
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:

1687370593277-png.287505
  • 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
  • Selecting Global API keys are disabled (can't setup new ones going forward). Includes deprecation notice (going away completely in the future, so migrate to API tokens if you are still using Global API keys!).
  • Unify primary classes so they can be shared without changes with WordPress version of this addon
  • If you don't already have a Cloudflare API token, the link to create one will pre-define the required permissions for you (way less annoying for new users)
  • Updated deep links inside cloudflare.com for Firewall events to reflect the new endpoint
  • Look back 7 days instead of 1 day to find account-level usage records for buckets
  • unfurl and image proxy Workers will use default language for site when they are setup
  • Changed URL where you set Worker subdomain and made it a property for easier changes in the future (Cloudflare changed it in their dashboard)
  • Make external URL include protocol (https:) rather than relative URLs (R2 subdomains always have valid SSL certificates, so no reason to serve up content insecurely even if the site isn't using HTTPS)
  • Automatic retry (once) if API/R2 calls return HTTP 499 response (same way we handle server-side [5xx errors])
  • Change verbiage on R2 operation log to be more clear about billable events
  • Don't hardcode dash.cloudflare.com prefix in admin:cloudflare_r2 template
  • Fix Zero round trip phrase being title case
  • Add direct link for setup of Zero Trust Access authentication method
  • Added new pre-set Cache Rule option to force caching of static content
  • Firewall rules can be toggled on/off
  • User agent rules can be toggled on/off
  • Page rules can be toggled on/off
  • Cache rules can be toggled on/off
  • Cloudflare analytics shown on admin index
1680191737902.png
  • Removed repository dependency within R2 adapter
  • When checking if a file exists on R2, only fall back to checking if it's a "directory" if there's no file extension in the path (less class A operations)
IMPORTANT for existing users: A change to Crawler Hint API calls requires a new API permission to be able to set it. You can go to your Cloudflare API Tokens, edit the token you have and add the following permissions:
  • Zone.Zone: Edit
You should have a total of 15 permissions for your API token at this point. If you don't have 15, you can check what you should have under XF Admin -> Options -> External service providers -> Cloudflare authentication
  • Fix for change to Crawler Hint API calls (needed to change Crawler Hints setting)
  • Updated parameters for Network error logging when doing "Easy config"
  • Normalize path when getting a list of multiple objects
  • Add support for getting listings of directories inside buckets in R2 adapter (a little tricky because R2 it not a file system in the traditional sense as there are no actual directories). Should make it so exporting styles with attached assets should work if those assets are stored in R2.
Hate pushing quick versions out (sorry)... but a necessary fix for media uploads which are handled slightly differently than other uploaded content (like avatars and attachments).
  • Added "Easy config" button to settings page to automatically optimize some settings for XenForo (currently it sets 22 Cloudflare settings in one go that work well for XenForo)
  • Don't use getContentUrl() method since it's only in XenForo 2.2
  • Force path and type keys when getting Metadata via R2 API
  • Better handling of non-existent R2 objects trying to be read by internal processes (throw FileNotFoundException)
1674662571033.png