summaryrefslogtreecommitdiffstats
path: root/files/etc
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2024-01-31 16:27:23 +0100
committerGuilhem Moulin <guilhem@fripost.org>2024-01-31 16:38:22 +0100
commit3b8151bbaeb569753fc9ddcb4d66af40c2de036a (patch)
tree79f664e2720b6b62cf97d80468306c01ec492ce6 /files/etc
parentf0488dccb2fe3cb7fc570372926abf0a312a8af8 (diff)
HTTPd: Add security and cache headers.
Diffstat (limited to 'files/etc')
-rw-r--r--files/etc/nginx/sites-enabled/webmap10
1 files changed, 10 insertions, 0 deletions
diff --git a/files/etc/nginx/sites-enabled/webmap b/files/etc/nginx/sites-enabled/webmap
index 26df41b..e967535 100644
--- a/files/etc/nginx/sites-enabled/webmap
+++ b/files/etc/nginx/sites-enabled/webmap
@@ -27,6 +27,13 @@ server {
ssl_certificate_key /etc/nginx/ssl/hel01.rsa.key;
include snippets/ssl.conf;
+ add_header Referrer-Policy "no-referrer";
+ add_header X-Frame-Options "SAMEORIGIN";
+ add_header X-Content-Type-Options "nosniff";
+ add_header X-XSS-Protection "1; mode=block";
+ add_header Strict-Transport-Security "max-age=31557600; includeSubDomains" always;
+ add_header Content-Security-Policy "default-src 'none'; connect-src 'self'; font-src 'self'; frame-src 'self'; img-src 'self' data: https://minkarta.lantmateriet.se/map/; script-src 'self'; style-src 'self'; frame-ancestors 'self'; form-action 'none'; base-uri 'self'";
+
root /var/www/webmap;
index index.html;
@@ -43,6 +50,9 @@ server {
}
location = /_.txt {
+ # cache 404 responses
+ add_header Strict-Transport-Security "max-age=31557600; includeSubDomains" always;
+ add_header Cache-Control "public; max-age=86400" always;
internal;
}