From b994136884fcdfc3c4f2bb92ca9efed0440af357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Martin?= Date: Thu, 21 Feb 2019 18:24:14 +0100 Subject: [PATCH] Revert "Adapt nginx configuration to avoid double headers due to core change (https://github.com/YunoHost/yunohost/commit/8cb029a55e471e1ece3a8a2d7bba00975a6f2d17)" This reverts commit 0ea58235700b7c8064083c2c561094ddee2550ce. --- conf/nginx.conf | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 2e085c9..1691095 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -13,23 +13,23 @@ location ^~ __PATH__ { } # Add headers to serve security related headers - more_set_headers "Strict-Transport-Security: max-age=15768000"; - more_set_headers "X-Content-Type-Options: nosniff"; - more_set_headers "X-XSS-Protection: 1; mode=block"; - more_set_headers "X-Robots-Tag: none"; - more_set_headers "X-Download-Options: noopen"; - more_set_headers "X-Permitted-Cross-Domain-Policies: none"; - more_set_headers "Referrer-Policy: no-referrer"; + add_header Strict-Transport-Security "max-age=15768000;"; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Robots-Tag none; + add_header X-Download-Options noopen; + add_header X-Permitted-Cross-Domain-Policies none; + add_header Referrer-Policy no-referrer; # Set max upload size client_max_body_size 10G; fastcgi_buffers 64 4K; - + # Extend timeouts client_body_timeout 60m; proxy_read_timeout 60m; fastcgi_read_timeout 60m; - + # Disable gzip to avoid the removal of the ETag header gzip off; @@ -78,15 +78,15 @@ location ^~ __PATH__ { # Adding the cache control header for js and css files location ~* \.(?:css|js)$ { - more_set_headers "Cache-Control: public, max-age=7200"; + add_header Cache-Control "public, max-age=7200"; # Add headers to serve security related headers - more_set_headers "Strict-Transport-Security: max-age=15768000"; - more_set_headers "X-Content-Type-Options: nosniff"; - more_set_headers "X-XSS-Protection: 1; mode=block"; - more_set_headers "X-Robots-Tag: none"; - more_set_headers "X-Download-Options: noopen"; - more_set_headers "X-Permitted-Cross-Domain-Policies: none"; - more_set_headers "Referrer-Policy: no-referrer"; + add_header Strict-Transport-Security "max-age=15768000;"; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Robots-Tag none; + add_header X-Download-Options noopen; + add_header X-Permitted-Cross-Domain-Policies none; + add_header Referrer-Policy no-referrer; # Optional: Don't log access to assets access_log off;