Skip to content

Commit

Permalink
fix: add missing security headers (#307)
Browse files Browse the repository at this point in the history
* fix: add missing security headers

* fix: set security headers on any resources

* fix: invalid rule

* fix: add netlify CDN cloudfront

* fix: set crossorigin attribute in webpack settings
  • Loading branch information
Th3S4mur41 authored Oct 5, 2021
1 parent 073c400 commit 2356658
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions public/_headers
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
Content-Security-Policy: default-src 'self' cloudfront.net *.cloudfront.net;
Referrer-Policy: no-referrer-when-downgrade
X-Content-Type-Options: nosniff

/*.html
Content-Security-Policy: default-src 'self'
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block

/*.js
Cache-Control: public, immutable, max-age=31536000
Expand Down
3 changes: 2 additions & 1 deletion webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ module.exports = {
output: {
filename: 'app.[hash].js',
path: path.resolve(__dirname, 'dist'),
assetModuleFilename: 'assets/[hash][ext]'
assetModuleFilename: 'assets/[hash][ext]',
crossOriginLoading: 'anonymous'
},
resolve: {
alias: {
Expand Down

0 comments on commit 2356658

Please sign in to comment.