From fd8a6ad9191eeb77d7936d0b8746d6db221f2d19 Mon Sep 17 00:00:00 2001 From: paspo Date: Sun, 13 Oct 2024 13:50:45 +0000 Subject: [PATCH] some extra headers (#285) Reviewed-on: https://git.libreschool.org/BgLUG/bglug.it/pulls/285 Co-authored-by: paspo Co-committed-by: paspo --- docker/rootfs/etc/nginx/http.d/default.conf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docker/rootfs/etc/nginx/http.d/default.conf b/docker/rootfs/etc/nginx/http.d/default.conf index f8b8a6d..ef5c44d 100644 --- a/docker/rootfs/etc/nginx/http.d/default.conf +++ b/docker/rootfs/etc/nginx/http.d/default.conf @@ -7,6 +7,13 @@ server { root /wwwroot; index index.html; + location ~ .* { + add_header X-Frame-Options "SAMEORIGIN"; + add_header X-Content-Type-Options "nosniff"; + add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"; + add_header Content-Security-Policy "default-src 'self'; img-src https://*; child-src 'none';"; + } + location ~ ^/feed { rewrite ^/feed$ /it/index.xml last; rewrite ^/feed/.*$ /it/index.xml last; @@ -36,7 +43,6 @@ server { location ~ .* { error_page 404 /it/404.html; } - } gzip on;