Skip to content

Instantly share code, notes, and snippets.

@cerico
Last active February 1, 2021 11:57
Show Gist options
  • Save cerico/080dedbda6343c01546a890a5e0f226a to your computer and use it in GitHub Desktop.
Save cerico/080dedbda6343c01546a890a5e0f226a to your computer and use it in GitHub Desktop.
Headers for Netlify
/*
Content-Security-Policy: form-action 'self'; base-uri 'self'; frame-ancestors none; default-src 'none'; script-src 'self' https://d3js.org https://*.googleapis.com; img-src 'self' https://*.ggpht.com https://*.googleapis.com https://*.gstatic.com data:; style-src 'self' https://*.googleapis.com 'unsafe-inline'; font-src 'self' https://*.gstatic.com data:; frame-src 'self'; connect-src 'self' https://apis.google.com; object-src 'none';
X-Frame-Options: SAMEORIGIN always
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
@cerico
Copy link
Author

cerico commented Feb 1, 2021

Put this file in the root of the directory you're publishing and get an A+ from https://observatory.mozilla.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment