From 517c9ef396d74e3f6c97e3adb9fb6af53502d7e6 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Fri, 22 Mar 2024 20:44:21 -0400 Subject: [PATCH] avoid regex location for webmanifest --- nginx/nginx.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 1cd44f32..aef2064f 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -325,6 +325,12 @@ http { location = /allowed_signers.sig {} location = /allowed_signers.asc {} + location = /manifest.webmanifest { + include snippets/security-headers.conf; + add_header Cross-Origin-Resource-Policy "same-origin" always; + add_header Cache-Control "public, max-age=604800"; + } + location = /favicon.ico { if ($http_accept ~ "image/svg\+xml") { rewrite ^ /favicon.svg last; @@ -408,12 +414,6 @@ http { add_header Cache-Control "public, max-age=31536000, immutable"; } - location ~ "\.webmanifest$" { - include snippets/security-headers.conf; - add_header Cross-Origin-Resource-Policy "same-origin" always; - add_header Cache-Control "public, max-age=604800"; - } - location ~ "\.svg$" { include snippets/security-headers.conf; add_header Cross-Origin-Resource-Policy "same-origin" always;