Skip to content

Commit

Permalink
try custom headers
Browse files Browse the repository at this point in the history
  • Loading branch information
goodroot committed Dec 12, 2024
1 parent 831a233 commit 64a3fad
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
18 changes: 18 additions & 0 deletions custom-headers/_previewHeaders
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
Content-Security-Policy: frame-src 'self' app.netlify.com *.demo.questdb.io *.questdb.io www.youtube.com www.slideshare.net forms.hsforms.com;

/docs/*
Location: /:splat
Status: 200

/static/*
Cache-Control: public, max-age=31536000, immutable

*.js
Cache-Control: public, max-age=31536000, immutable

*.css
Cache-Control: public, max-age=31536000, immutable
14 changes: 14 additions & 0 deletions custom-headers/_productionHeaders
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
Content-Security-Policy: frame-src 'self' app.netlify.com *.demo.questdb.io *.questdb.io www.youtube.com www.slideshare.net forms.hsforms.com;

/static/*
Cache-Control: public, max-age=31536000, immutable

*.js
Cache-Control: public, max-age=31536000, immutable

*.css
Cache-Control: public, max-age=31536000, immutable
6 changes: 6 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -665,3 +665,9 @@ to = "/:splat"
status = 200
force = true
conditions = {Context = "deploy-preview"}

[context.production]
command = "npm run build && cp ./custom-headers/_productionHeaders ./build/_headers"

[context.deploy-preview]
command = "npm run build && cp ./custom-headers/_previewHeaders ./build/_headers"

0 comments on commit 64a3fad

Please sign in to comment.