Skip to content

Commit

Permalink
Add script to create security headers in portal
Browse files Browse the repository at this point in the history
  • Loading branch information
gndelia committed Aug 22, 2024
1 parent 522d52d commit 102cc7a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
27 changes: 27 additions & 0 deletions webapp/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
</IfModule>

<IfModule mod_headers.c>
Header always set X-Frame-Options "SAMEORIGIN"
</IfModule>

<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>

<IfModule mod_headers.c>
Header always set X-XSS-Protection "1; mode=block"
</IfModule>

<IfModule mod_headers.c>
Header always set X-Download-Options "noopen"
</IfModule>

<IfModule mod_headers.c>
Header always set Expect-CT "max-age=86400, enforce"
</IfModule>

<IfModule mod_headers.c>
Header always set Referrer-Policy "no-referrer-when-downgrade"
</IfModule>
2 changes: 2 additions & 0 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
"version": "1.0.0",
"scripts": {
"build": "next build",
"copy:htaccess": "cp .htaccess out/.htaccess",
"dev": "next dev",
"dev:wifi": "WIFI=true LOCAL_IP=$(ipconfig getifaddr en0) PORT=3000 npm run dev",
"deploy": "npm run build",
"postbuild": "npm run copy:htaccess",
"preserve": "npm run build",
"serve": "serve out"
},
Expand Down

0 comments on commit 102cc7a

Please sign in to comment.