Skip to content

Commit

Permalink
Set cache headers for files in dist
Browse files Browse the repository at this point in the history
  • Loading branch information
krompaco committed Jul 19, 2023
1 parent e8d9287 commit 15ac39d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion content/demo-site/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@
X-Content-Type-Options = "nosniff"
Referrer-Policy = "no-referrer"
Permissions-Policy = "accelerometer=(), autoplay=(), camera=(), cross-origin-isolated=(), display-capture=(), encrypted-media=(), fullscreen=(), geolocation=(), gyroscope=(), keyboard-map=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), sync-xhr=(), usb=(), xr-spatial-tracking=(), clipboard-read=(), clipboard-write=(), gamepad=(), interest-cohort=(), hid=(), idle-detection=(), serial=()"
Content-Security-Policy = "default-src 'none'; base-uri 'self'; script-src 'self'; img-src 'self' cloudfront.net *.cloudfront.net api.netlify.com/api/v1/badges/; style-src 'self' 'unsafe-inline'; font-src 'self'; form-action 'none'; frame-src 'none'; connect-src 'self'; media-src 'self'; child-src 'self'; frame-ancestors 'none'; worker-src 'none'; manifest-src 'none';"
Content-Security-Policy = "default-src 'none'; base-uri 'self'; script-src 'self'; img-src 'self' cloudfront.net *.cloudfront.net api.netlify.com/api/v1/badges/; style-src 'self' 'unsafe-inline'; font-src 'self'; form-action 'none'; frame-src 'none'; connect-src 'self'; media-src 'self'; child-src 'self'; frame-ancestors 'none'; worker-src 'none'; manifest-src 'none';"
[[headers]]
for = "/dist/*"
[headers.values]
Cache-Control = "public, max-age=31536000"
6 changes: 5 additions & 1 deletion content/record-collector-dotnet/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@
X-Content-Type-Options = "nosniff"
Referrer-Policy = "no-referrer"
Permissions-Policy = "accelerometer=(), autoplay=(), camera=(), cross-origin-isolated=(), display-capture=(), encrypted-media=(), fullscreen=(), geolocation=(), gyroscope=(), keyboard-map=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), sync-xhr=(), usb=(), xr-spatial-tracking=(), clipboard-read=(), clipboard-write=(), gamepad=(), interest-cohort=(), hid=(), idle-detection=(), serial=()"
Content-Security-Policy = "default-src 'none'; base-uri 'self'; script-src 'self'; img-src 'self' cloudfront.net *.cloudfront.net api.netlify.com/api/v1/badges/; style-src 'self' 'unsafe-inline'; font-src 'self'; form-action 'none'; frame-src 'none'; connect-src 'self'; media-src 'self'; child-src 'self'; frame-ancestors 'none'; worker-src 'none'; manifest-src 'none';"
Content-Security-Policy = "default-src 'none'; base-uri 'self'; script-src 'self'; img-src 'self' cloudfront.net *.cloudfront.net api.netlify.com/api/v1/badges/; style-src 'self' 'unsafe-inline'; font-src 'self'; form-action 'none'; frame-src 'none'; connect-src 'self'; media-src 'self'; child-src 'self'; frame-ancestors 'none'; worker-src 'none'; manifest-src 'none';"
[[headers]]
for = "/dist/*"
[headers.values]
Cache-Control = "public, max-age=31536000"

2 comments on commit 15ac39d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.