summaryrefslogtreecommitdiffstats
path: root/files/etc/nginx/sites-enabled/webmap
diff options
context:
space:
mode:
Diffstat (limited to 'files/etc/nginx/sites-enabled/webmap')
-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;
}