From 8303fcf48f59cf622adb8cbb97d35aeec4d67745 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Mon, 2 Sep 2024 23:23:00 +0300 Subject: [PATCH] nginx: move processing of remaining static files to main location block --- dist/nginx.conf | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dist/nginx.conf b/dist/nginx.conf index f558211451..78ee8a5404 100644 --- a/dist/nginx.conf +++ b/dist/nginx.conf @@ -65,17 +65,12 @@ server { gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml image/x-icon; location / { + add_header Strict-Transport-Security "max-age=63072000; includeSubDomains"; try_files $uri @proxy; } # If Docker is used for deployment and Rails serves static files, # then needed must replace line `try_files $uri =404;` with `try_files $uri @proxy;`. - location = /sw.js { - add_header Cache-Control "public, max-age=604800, must-revalidate"; - add_header Strict-Transport-Security "max-age=63072000; includeSubDomains"; - try_files $uri =404; - } - location ^~ /assets/ { add_header Cache-Control "public, max-age=2419200, must-revalidate"; add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";