[DigitalPoint] App for Cloudflare®

[DigitalPoint] App for Cloudflare® 1.8.8

No permission to download
Also what images exactly are missing? Do you have a sample URL of the missing URL?
It actually worked but didn’t edit my original post quick enough. Do you have any idea why I had that problem? I’m sure it’s something on my end but I have no idea what And thank you for your quick help.

To answer your question it was avatars, profile photos, images from Ozzy‘s movie, tv and video game starter. I didn’t get the sample url.
 
Last edited:
If you want to use R2 and you have existing thing, you will want to move them to R2. You can’t have something like some user’s avatars in R2 and other user’s not. There is a CLI command you can use to move stuff, or you can use something like rclone.

But simply enabling/disabling R2 does not migrate existing data.
 
If you want to use R2 and you have existing thing, you will want to move them to R2. You can’t have something like some user’s avatars in R2 and other user’s not. There is a CLI command you can use to move stuff, or you can use something like rclone.

But simply enabling/disabling R2 does not migrate existing data.

Gtcha and thank you for explaining. Now when I upload new images they’re coming out broken. Any ideas why? Thanks
 
Gtcha and thank you for explaining. Now when I upload new images they’re coming out broken. Any ideas why? Thanks
Do you have a sample URL of one of the broken images?

@digitalpoint According to your changelog I've added the new account billing API permission. But I can't find anything related to that in the admin backend...?
I didn’t say much about it because I wasn’t too excited about a feature that didn’t work on Free plan. It’s the token authentication system that was part of that uodate:


Added ability to use Token Authentication system for attachments stored in R2 (needs new permission... see above). This only works for zones that are not on the Free tier (which is why the billion permission is needed to check if the zone is on a paid plan or not).

If you have a paid plan, and you are using R2 for attachments, you will get a button on the R2 page to enable it.
 
Ah, that explains it. I have a paid plan but not using R2 (plenty of fast local storage). Thanks for the explanation.
 
Last edited:
digital point said: Was going down the path of trying to do a synchronous AJAX request in native JavaScript (rewriting for XF 2.3) and then trying to handle a bunch of one-off situations where XenForo is injecting CSRF tokens into certain GET requests because they are using GET to mutate user state for some reason... just was getting too kludgey and cumbersome. And since CSRF isn't really needed anymroe these days, I decided to take the cleaner/simpler route (which will also make sites faster). Just use Sec-Fetch-Site instead of CSRF... problem solved. :)

Maybe it's worthwhile to check out the suggestion that XenForo does away with CSRF in it's core: https://xenforo.com/community/threa...ion-cloudflare-full-html-page-caching.202315/


Consider upvoting this suggestion if you find digitalpoint’s and eva2000’s suggestion valid.
 
Are you sure it was ever there? The addon/R2 doesn’t delete anything that’s already existing. Is it possible it was added while you had R2 enabled and then when you disabled it, it did t get moved to the local filesystem?

As I said before, enabling/disabling R2 doesn’t move or delete anything. So just like enabling it doesn’t move anything to R2, disabling it doesn’t move anything off R2.
 
Are you sure it was ever there? The addon/R2 doesn’t delete anything that’s already existing. Is it possible it was added while you had R2 enabled and then when you disabled it, it did t get moved to the local filesystem?

As I said before, enabling/disabling R2 doesn’t move or delete anything. So just like enabling it doesn’t move anything to R2, disabling it doesn’t move anything off R2.

Strange but everything is working now. I must be losing it. Thanks again for your help.
 
I did see some people say it didn't work on their site (on Cloudflare's Discord server, not here), but didn't see if anyone figured it out.
So… I decided to test something out and it looks like Cloudflare is not handling newer fonts added to Google Fonts database right now. I switched to the most popular font on their database Roboto, and it was instantly served through cf-fonts folder lol. Frustrating, coz I really like one of the newer fonts (Onest) added to the platform recently. Just a FYI who might be wondering what’s going on.
 
If anyone is interested in the WordPress version of this addon, it's (finally) on wordpress.org, so should be installable from WordPress admin now.

View attachment 292057

Looks great, thanks. Do you know if it can work with Litespeed wordpress plugin when Cloudflare is configured there, or should it be disabled?

 
Looks great, thanks. Do you know if it can work with Litespeed wordpress plugin when Cloudflare is configured there, or should it be disabled?

I’d probably disable it if it’s trying to effectively do the same thing. Something done at the web server level is going to be less advanced than something done at the application level as far as making decisions about what should/should not be cached or when to purge the cache (like if a new post is made).
 
Question: I had to roll my access token.
Now I get the message '9109: Invalid access token'
This makes sense, but eh... to change the access token in the add-on, I have to go to settings which shows this error.
Any way to change the access token?
Would be nice to change the token somewhere else, for example in XF options?
 
Question: I had to roll my access token.
Now I get the message '9109: Invalid access token'
This makes sense, but eh... to change the access token in the add-on, I have to go to settings which shows this error.
Any way to change the access token?
Would be nice to change the token somewhere else, for example in XF options?
XenForo options is the only place you can change (or initially set) the token and you should be able to change it even if the existing one is invalid.

XF Admin -> Options -> Cloudflare
 
My bad 🥴 , sorry for that! I totally missed it.
Got a new error when visiting settings.
Not sure but I think it happend after switching from free to pro plan.

Code:
ErrorException: [E_WARNING] Undefined array key "fight_mode" in src/addons/DigitalPoint/Cloudflare/Repository/Cloudflare.php at line 955
XF::handlePhpError() in src/addons/DigitalPoint/Cloudflare/Repository/Cloudflare.php at line 955
DigitalPoint\Cloudflare\Repository\CloudflareAbstract->getZoneSettings() in src/addons/DigitalPoint/Cloudflare/Repository/Cloudflare.php at line 672
DigitalPoint\Cloudflare\Repository\CloudflareAbstract->organizeSettings() in src/addons/DigitalPoint/Cloudflare/Admin/Controller/Cloudflare.php at line 49
DigitalPoint\Cloudflare\Admin\Controller\Cloudflare->actionIndex() in src/XF/Mvc/Dispatcher.php at line 352
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2487
XF\App->run() in src/XF.php at line 524
XF::runApp() in admin.php at line 13
 
My bad 🥴 , sorry for that! I totally missed it.
Got a new error when visiting settings.
Not sure but I think it happend after switching from free to pro plan.

Code:
ErrorException: [E_WARNING] Undefined array key "fight_mode" in src/addons/DigitalPoint/Cloudflare/Repository/Cloudflare.php at line 955
XF::handlePhpError() in src/addons/DigitalPoint/Cloudflare/Repository/Cloudflare.php at line 955
DigitalPoint\Cloudflare\Repository\CloudflareAbstract->getZoneSettings() in src/addons/DigitalPoint/Cloudflare/Repository/Cloudflare.php at line 672
DigitalPoint\Cloudflare\Repository\CloudflareAbstract->organizeSettings() in src/addons/DigitalPoint/Cloudflare/Admin/Controller/Cloudflare.php at line 49
DigitalPoint\Cloudflare\Admin\Controller\Cloudflare->actionIndex() in src/XF/Mvc/Dispatcher.php at line 352
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2487
XF\App->run() in src/XF.php at line 524
XF::runApp() in admin.php at line 13
Hmmm... is that consistent? I could see one of a few things happening:
  1. Your API token doesn't have the required permission: Zone.Bot Management: Edit
  2. The API call failed to get the bot management info (would probably work if you tried again if that was the case).
  3. If the results it got were malformed (specifically missing a value in result.fight_mode.
Assuming it's still happening, can you first log into your Cloudflare account (on cloudflare.com) and just visit this URL and tell me what you get?

https://dash.cloudflare.com/api/v4/zones/{zone_id}/bot_management

Replace {zone_id) with the zone ID in question, of course.
 
Back
Top Bottom