Discourse 与 Cloudflare

你好。

我阅读了一些关于 Cloudflare 和 Discourse 的指南,但并没有从中得到清晰明确的结论。有些说法称 Discourse 和 Cloudflare 无法很好地协同工作,另一些则说可以;有的提到需要在 app.yml 中进行一些调整(例如添加额外的子域名),而另一些则表示无需任何调整即可正常运行。

根据我的经验,Discourse 在不进行任何调整的情况下似乎也能正常工作(我曾担心进行这些调整,因为我不太理解其原理,也担心指南可能已过时)。

另一方面,这里的一位用户在被问及如何增强安全性时,建议我“将 Discourse 置于 Cloudflare 之后,并设置一条页面规则以‘禁用性能优化’,以免其干扰代码”。这条规则应该是什么样的?我完全不清楚。

如您所见,我在这方面需要一些帮助。

提前感谢。

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-

3 个赞

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

6 个赞