Skip to content

Commit

Permalink
Merge pull request #1238 from gethinode/develop
Browse files Browse the repository at this point in the history
Modify server headers
  • Loading branch information
markdumay authored Oct 12, 2024
2 parents 5c539ec + fa1fcc3 commit 47d582f
Show file tree
Hide file tree
Showing 7 changed files with 644 additions and 215 deletions.
2 changes: 1 addition & 1 deletion config/_default/server.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Content-Security-Policy = """
base-uri 'self'; \
connect-src 'self' *.google-analytics.com *.analytics.google.com *.googletagmanager.com; \
default-src 'none' 'self'; \
default-src 'none'; \
font-src 'self' fonts.gstatic.com; \
form-action 'self'; \
frame-src player.cloudinary.com player.vimeo.com www.youtube-nocookie.com www.youtube.com; \
Expand Down
8 changes: 4 additions & 4 deletions exampleSite/config/_default/netlify.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[[redirects]]
from = '/fr/**'
from = '/fr/*'
to = '/fr/404.html'
status = 404

[[redirects]]
from = '/nl/**'
from = '/nl/*'
to = '/nl/404.html'
status = 404

[[redirects]]
from = '/en/**'
from = '/en/*'
to = '/en/404.html'
status = 404

[[redirects]] # Default language should be last.
from = '/**'
from = '/*'
to = '/en/404.html'
status = 404
16 changes: 8 additions & 8 deletions exampleSite/config/_default/server.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
Access-Control-Allow-Origin = '*'
Content-Security-Policy = """
base-uri 'self'; \
connect-src 'self' *.google-analytics.com *.analytics.google.com *.googletagmanager.com; \
connect-src 'self' *.cookieyes.com cdn-cookieyes.com *.google-analytics.com *.analytics.google.com *.googletagmanager.com; \
default-src 'none'; \
font-src 'self' fonts.gstatic.com; \
form-action 'self'; \
frame-src player.cloudinary.com player.vimeo.com www.youtube-nocookie.com www.youtube.com; \
img-src 'self' *.google-analytics.com *.googletagmanager.com data: *.imgix.net *.imagekit.io *.cloudinary.com i.vimeocdn.com i.ytimg.com tile.openstreetmap.org; \
img-src 'self' cdn-cookieyes.com *.google-analytics.com *.googletagmanager.com data: *.imgix.net *.imagekit.io *.cloudinary.com i.vimeocdn.com i.ytimg.com tile.openstreetmap.org; \
manifest-src 'self'; \
media-src 'self'; \
object-src 'none'; \
script-src 'self' *.google-analytics.com *.googletagmanager.com; \
style-src 'self' www.youtube.com; \
script-src 'self' cdn-cookieyes.com *.google-analytics.com *.googletagmanager.com; \
style-src 'self' 'unsafe-inline' www.youtube.com; \
"""
Permissions-Policy = 'geolocation=(), midi=(), sync-xhr=(), microphone=(), camera=(), magnetometer=(), gyroscope=(), fullscreen=(), payment=() '
Referrer-Policy = 'strict-origin'
Expand All @@ -28,22 +28,22 @@
cache-control = 'max-age=0, no-cache, no-store, must-revalidate '

[[redirects]]
from = '/fr/**'
from = '/fr/*'
status = 404
to = '/fr/404.html'

[[redirects]]
from = '/nl/**'
from = '/nl/*'
status = 404
to = '/nl/404.html'

[[redirects]]
from = '/en/**'
from = '/en/*'
status = 404
to = '/en/404.html'

[[redirects]]
from = '/**'
from = '/*'
status = 404
to = '/en/404.html'

8 changes: 4 additions & 4 deletions exampleSite/data/server.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@

# toml-docs-start server-custom-404
[[redirects]]
from = '/fr/**'
from = '/fr/*'
to = '/fr/404.html'
status = 404

[[redirects]]
from = '/nl/**'
from = '/nl/*'
to = '/nl/404.html'
status = 404

[[redirects]]
from = '/en/**'
from = '/en/*'
to = '/en/404.html'
status = 404

[[redirects]] # Default language should be last.
from = '/**'
from = '/*'
to = '/en/404.html'
status = 404
# toml-docs-end server-custom-404
Loading

0 comments on commit 47d582f

Please sign in to comment.