My website is not loading after turning on the CSP settings

Hi Team,

I have launched a discourse forum 1 month back and I was trying to enable Adsense.

I have used the below link to fix my CSP related erros and added following whitelisting parameters

1. 'self'
2. 'unsafe-inline'
3. 'unsafe-eval'
4.  'none'

CSP: script-src - HTTP | MDN

Now, my website is not loading.

Please help me bringing back my website, so that I can reset my CSP settings.
Below is my forum url

1 Like

You will need SSH access to your site, and open the Rails console with:

cd /var/discourse
./launcher enter app
rails c


SiteSetting.content_security_policy_script_src = ""

This will reset your CSP setup back to default, and you should be able to get back to your site.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.