Discourse and cloudflare

AI-generated summary

A user seeks clarification on using Cloudflare with Discourse, noting conflicting advice about compatibility and configuration. They mention that Discourse seems to work without changes but are unsure about security enhancements, particularly regarding Cloudflare’s performance settings. Remah directs them to the official Discourse guide on CDN acceleration and advises disabling performance optimizations like Rocket Loader for JavaScript, CSS, and HTML. bartv shares that they successfully use Cloudflare with Discourse and references their setup for further guidance.

Hello.

I was reading some of the guides about cloudflare and discourse and didn’t quite get anything strightforward out of it. Some say discourse and cloudflare don’t work well together, others say they do, some say there have to be some tweaking in app.yml (some additional subdomain), others say it works just fine without that.

IN my experience, discourse seems to work fine without the tweaking (which I feared doing because i didn’t quite understand it and i feared the guide might be outdated).

On the other side an user here, when asked about how to enhance security, recommended me to “put discourse behind Cloudflare with a page rule to “disable performance” so that it doesn’t screw around with the code.”. What should that rule look like? I have no idea.

As you can see i need some help with this.

TY in advance.

All posts are not created equal so have you looked at the official how-to for admins:

I don’t use Cloudflare but I understand that you should disable Cloudflare’s speed/performance optimizations for JavaScript, CSS and HTML. It is particularly important to disable Rocket Loader:

https://support.cloudflare.com/hc/en-us/articles/200168206-How-do-I-access-my-Cloudflare-Performance-Settings-

We use Cloudflare with Discourse, but there are some things to watch out for. Here’s our setup: