From 1b64787dd52e1a2b704d273942d265a98678a0e7 Mon Sep 17 00:00:00 2001 From: paspo Date: Tue, 22 Oct 2024 14:56:29 +0200 Subject: [PATCH 1/2] hotfix --- docker/rootfs/etc/nginx/http.d/default.conf | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docker/rootfs/etc/nginx/http.d/default.conf b/docker/rootfs/etc/nginx/http.d/default.conf index b57b670..95077ac 100644 --- a/docker/rootfs/etc/nginx/http.d/default.conf +++ b/docker/rootfs/etc/nginx/http.d/default.conf @@ -12,6 +12,9 @@ server { add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"; add_header Content-Security-Policy "default-src 'self'; img-src https://*; child-src 'none';"; + + include /etc/nginx/mime.types; + types { text/calendar ics; } @@ -21,16 +24,16 @@ server { rewrite ^/feed/.*$ /it/index.xml last; } - location ~ ^/events/elenco/ { + location = /events/elenco/ { default_type "text/calendar"; - rewrite ^/events/elenco/.*$ /it/index.ics last; + rewrite ^.*$ /it/index.ics last; } - location ~ ^/wp\-content/uploads/2008/02/Statuto\.pdf$ { + location = /wp-content/uploads/2008/02/Statuto.pdf { return 301 https://bglug.it/it/chi-siamo/Statuto.pdf; } - location ~ ^/en/.* { + location ^~ /en/ { error_page 404 /en/404.html; } } -- 2.47.2 From 3247899af931315761fe97e487ebb2c59f98c7a7 Mon Sep 17 00:00:00 2001 From: paspo Date: Tue, 22 Oct 2024 15:07:05 +0200 Subject: [PATCH 2/2] allow extra config --- docker/rootfs/etc/nginx/http.d/default.conf | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docker/rootfs/etc/nginx/http.d/default.conf b/docker/rootfs/etc/nginx/http.d/default.conf index 95077ac..fc881ad 100644 --- a/docker/rootfs/etc/nginx/http.d/default.conf +++ b/docker/rootfs/etc/nginx/http.d/default.conf @@ -9,11 +9,9 @@ server { error_page 404 /it/404.html; 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';"; - include /etc/nginx/mime.types; + include /etc/nginx/http.custom.d/*.conf; types { text/calendar ics; -- 2.47.2