Skip to content

Commit

Permalink
Configure HTTP Headers (#2021)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaharagon committed Feb 24, 2023
1 parent 23b7eff commit 561f6a7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mkdocs.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ INHERIT: mkdocs.yml
plugins:
meta: {}
privacy:
external_assets_exclude:
- cdn.jsdelivr.net/npm/mathjax@3/*
- api.privacyguides.net/*
- giscus.app/*
external_assets_exclude: ['https://cdn.jsdelivr.net/npm/mathjax@3/*', 'https://api.privacyguides.net/*']
external_links_noopener: true
git-committers:
enabled: !ENV [PRODUCTION, false]
repository: privacyguides/privacyguides.org
Expand Down
14 changes: 14 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@
[context.production.environment]
PRODUCTION = "true"

[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "0"
X-Content-Type-Options = "nosniff"
Strict-Transport-Security = "max-age=63072000; includeSubDomains; preload"
Content-Security-Policy = "default-src 'none'; script-src https://www.privacyguides.org https://api.privacyguides.net 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src data: 'self'; connect-src https://api.github.com https://api.privacyguides.net 'self'"

[[headers]]
for = "/about/donate/"
[headers.values]
Content-Security-Policy = "default-src 'none'; script-src https://opencollective.com https://www.privacyguides.org https://api.privacyguides.net 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src https://opencollective.com data: 'self'; connect-src https://api.github.com https://api.privacyguides.net 'self'; frame-src https://opencollective.com"

[[redirects]]
from = "/.well-known/matrix/*"
to = "https://matrix.privacyguides.org/.well-known/matrix/:splat"
Expand Down

0 comments on commit 561f6a7

Please sign in to comment.