<div dir="auto">Hi,<div dir="auto"><br></div><div dir="auto">I would like to enable Content Security Policy header on Nginx for our website to protect from data injection attacks and XSS. Can I add like the below config?. If anybody hit our URL they will know the allowed domains in the header.</div><div dir="auto"><br></div><div dir="auto">Is there any other bettery way to do this?</div><div dir="auto"><div dir="auto"><br></div></div><div dir="auto"><div dir="auto">add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' <a href="https://ssl.google-analytics.com">https://ssl.google-analytics.com</a> <a href="https://assets.zendesk.com">https://assets.zendesk.com</a> <a href="https://connect.facebook.net">https://connect.facebook.net</a>; img-src 'self' <a href="https://ssl.google-analytics.com">https://ssl.google-analytics.com</a> <a href="https://s-static.ak.facebook.com">https://s-static.ak.facebook.com</a> <a href="https://assets.zendesk.com">https://assets.zendesk.com</a>; style-src 'self' 'unsafe-inline' <a href="https://fonts.googleapis.com">https://fonts.googleapis.com</a> <a href="https://assets.zendesk.com">https://assets.zendesk.com</a>; font-src 'self' <a href="https://themes.googleusercontent.com">https://themes.googleusercontent.com</a>; frame-src <a href="https://assets.zendesk.com">https://assets.zendesk.com</a> <a href="https://www.facebook.com">https://www.facebook.com</a> <a href="https://s-static.ak.facebook.com">https://s-static.ak.facebook.com</a> <a href="https://tautt.zendesk.com">https://tautt.zendesk.com</a>; object-src 'none'";</div><div dir="auto"><br></div><div dir="auto"><br></div></div></div>