Site is not loading cause of CSP

I have tried SSH into server and run the following commands but still the site is blank.

cd /var/discourse
./launcher enter app
rails c
SiteSetting.content_security_policy = false
SiteSetting.content_security_policy_script_src = ""

2 Likes

I wonder why are you using rocket loader with Discourse?

You can try disabling rocket loader in cloudflare page rules for your sub-domain and that would probably help you with this issue.

2 Likes

I have fixed that issue by temporarily disabling cloudflare as proxy to my forum then adding rocket-loader.js to content_security_policy_script_src

3 Likes

Just to be clear,

Don’t use rocket loader with discourse as it causes issues with the functioning of Discourse.

2 Likes