From 75f4b333232ee99cd6af146c08a66c6ee4865f98 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Thu, 18 Nov 2021 18:50:44 -0500 Subject: set up SRI for future use by CSP v3 --- nginx/nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nginx') diff --git a/nginx/nginx.conf b/nginx/nginx.conf index efea91ca..61b901cb 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -74,7 +74,7 @@ http { map $http_cookie $preload_resources { "~*__Host-preload=1" ""; - default "; rel=preload; as=style, ; rel=preload; as=font; crossorigin, ; rel=preload; as=font; crossorigin, ; rel=preload; as=image"; + default "<{{path|/main.css}}>; rel=preload; as=style, ; rel=preload; as=font; crossorigin, ; rel=preload; as=font; crossorigin, <{{path|/mask-icon.svg}}>; rel=preload; as=image"; } server { @@ -259,7 +259,7 @@ http { add_header Cache-Control "public, max-age=604800"; } - location = /mask-icon.svg { + location = {{path|/mask-icon.svg}} { include snippets/security-headers.conf; add_header Cross-Origin-Resource-Policy "same-origin" always; add_header Cache-Control "public, max-age=31536000, immutable"; -- cgit v1.3.1