[DigitalPoint] Cloudflare

[DigitalPoint] Cloudflare 1.2.1.1

No permission to download

digitalpoint

Well-known member
digitalpoint submitted a new resource:

[DigitalPoint] Cloudflare - Configure and manage Cloudflare from within XenForo.

Features
Everything is available from within XenForo (you do not need to go to Cloudflare for things) via the Cloudflare API. This allows you give admins permission to do certain things (for example block IP addresses within Cloudflare without giving them access to your Cloudflare account).

It simplifies/automates much of the configuration and usage of Cloudflare with XenForo.
  • Manage all Cloudflare settings/options for your zone.
  • Ability to purge...

Read more about this resource...
 

digitalpoint

Well-known member
Can this be used on shared hosting? you need a paid cloudflare account, correct?
Yes, it can be used on shared hosting. No, you do not need a paid Cloudflare account. You just need a Cloudflare account. The free tier works perfectly fine (and works really well). Unless you are really doing crazy enterprise stuff with your site, I don't really see a use for the paid Cloudflare plans myself.

Personally, I have one paid zone in Cloudflare, and to be honest the only reason I ever did that was because I didn't want to share an SSL certificate with other zones. But Cloudflare stopped doing that even for the free tier awhile ago. At this point I just leave it on the paid tier because Cloudflare is really good and even though I don't need any paid tier for any zone, I figure I'll give them $20/month so they get something from me. Don't want them to go out of business. haha
 
Last edited:

nicodak

Well-known member
Hello, What do you recommend about common settings with this addon and on the cloudlfare console (website)? Reset the settings on the console and recreate them with the addon (the rules for example)? In FREE mode we are entitled to 3 rules, can we create 3 on the console and create others with the addon, does it work?
Thanks.
 

digitalpoint

Well-known member
No, using the API doesn’t let you get around their limitation on things like number of page rules for your tier. For XenForo sites, I just use 2 (the ones for css and image proxy caching that the addon can add for you).

Beyond that, the settings I use myself you can see in the screenshots for the addon. But of course your site might have different needs.

You don’t need to reset or redo anything. The API gives you access to your existing setup without needing to change anything. Your Cloudflare account will reflect anything you do in the console or in XF admin via the API in real-time in both directions. Like when you install addon, you can see all your settings for your zone right away.
 

Jake B.

Well-known member
I don't really see a use for the paid Cloudflare plans myself.

The image optimization / conversion features are really nice if you make some tweaks to XenForo's attachment system to allow them to cache the full size attachments. It lets you serve webp versions of images without having to convert/store duplicates on your server, and handles fallback to supported versions on legacy browsers as well
 

digitalpoint

Well-known member
Ya, although if you cache attachments at the network edge, you bypass XF’s permission system for attachments which isn’t something I wanted to do personally.

WebP is nice, although I’m kind of waiting for XF to support WebP natively and then I’ll convert some of my stuff to WebP on the server and probably make a XF addon that handles fallback to other formats for older browsers. Basically do some of what Cloudflare is doing. I have control issues. I want to know how things work and if I code it myself, I know how it works, rather than rely on Xloudflare magic. 😉
 

Jake B.

Well-known member
Ya, although if you cache attachments at the network edge, you bypass XF’s permission system for attachments which isn’t something I wanted to do personally.

We've got a few things in place on the places we're doing that, for guest viewable attachments we're not doing anything special and the default behavior is only to add the cache-control headers to guest attachments, but we've got a toggle to allow it for private attachments with a content_type whitelist so it can't be used on things like conversations, but we're not actually using that anywhere as far as I'm aware.

I'd imagine adding an additional hash to the URL could help with that as well, but never got around to it. Something that could make a good addition here though :)

It does require another page rule to be setup for domain.com/attachments/* unless you want the cache everything to be applied to the full domain
 

digitalpoint

Well-known member
Ya, it's definitely doable, just not something I ever really needed to do (I don't have any sites that are attachment heavy). Even with my spider spidering 24/7 (it takes by far the most bandwidth of anything I have), I have enough unused bandwidth in my setup that I could send out every attachment across every site I have repeatedly every second, so... lol For my (non-attachment heavy sites), there's far better places for me to save resources/make things more efficient. If I was running something like Google images on my servers, ya... that would be a different story. :)
 

eva2000

Well-known member
Personally, I have one paid zone in Cloudflare, and to be honest the only reason I ever did that was because I didn't want to share an SSL certificate with other zones. But Cloudflare stopped doing that even for the free tier awhile ago. At this point I just leave it on the paid tier because Cloudflare is really good and even though I don't need any paid tier for any zone, I figure I'll give them $20/month so they get something from me. Don't want them to go out of business. haha

Congrats Shawn on the release :) FYI, Cloudflare For SaaS is now available on all Cloudflare plans https://blog.cloudflare.com/cloudflare-for-saas/ so technically, you can use 1x Cloudflare plan to setup custom hostnames on non-Cloudflare domains and have those domains covered under Cloudflare plan's features i.e. CDN caching etc.
 

NobleMan

Well-known member
Nice addon.
I have installed this and almost everything seems to be working, the only thing I can't see is the settings page.
9109: Unauthorized to access requested resource.

Not sure if Zero Trust has anything to do with it?
 

digitalpoint

Well-known member
Nice addon.
I have installed this and almost everything seems to be working, the only thing I can't see is the settings page.
9109: Unauthorized to access requested resource.

Not sure if Zero Trust has anything to do with it?
Double check the API token you created in your Cloudflare account for it. Specifically, this is the minimum it needs to fully function:

1653154044769.png
 
Top