mirror of
http://nostr-git-proxy.forgejo.svc.cluster.local/git/45387ca441053e230b2126802005eb03767ab59d84555e8bac86b6e7def14e27/bestdadjokes
synced 2026-11-03 07:26:59 +00:00
fix(security): add HSTS, X-Frame-Options, and Permissions-Policy headers
All checks were successful
Build and Deploy / deploy (push) Successful in 14s
All checks were successful
Build and Deploy / deploy (push) Successful in 14s
- Adds HSTS (max-age=31536000; includeSubDomains) - Adds X-Frame-Options SAMEORIGIN - Adds Permissions-Policy disabling unused browser APIs - Repeats headers in static asset location block to prevent Nginx inheritance drop Closes #58c277c25ba1760db42586a1321d46446d3f168b49363983223b02f77d4e6471
This commit is contained in:
parent
21a8f9e294
commit
a7fad063cf
1 changed files with 9 additions and 0 deletions
|
|
@ -17,9 +17,18 @@ http {
|
|||
error_page 404 /404.html;
|
||||
add_header X-Content-Type-Options nosniff always;
|
||||
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always;
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
|
||||
location ~* \.(css|js|svg|png|jpg|ico|woff2?)$ {
|
||||
expires 7d;
|
||||
add_header Cache-Control "public";
|
||||
add_header X-Content-Type-Options nosniff always;
|
||||
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always;
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
}
|
||||
location / {
|
||||
try_files $uri $uri/ $uri/index.html =404;
|
||||
|
|
|
|||
Loading…
Reference in a new issue