diff options
Diffstat (limited to 'nginx')
| -rw-r--r-- | nginx/nginx.conf | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 260bc0ab..e39500de 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -81,7 +81,7 @@ http { aio_write on; map $uri $preload_resources_uri { - /index.html ", </phone.png>; rel=preload; as=image, <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}"; + /index.html ", <{{path|/pixel-7-pro.svg}}>; rel=preload; as=image, <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}"; /faq.html ", <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}"; /install/index.html ", <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}"; /install/cli.html ", <{{path|/js/redirect.js}}>; rel=modulepreload; integrity={{integrity|/js/redirect.js}}"; @@ -116,7 +116,7 @@ http { } map $nopush $push_phone { - 0 /phone.png; + 0 "{{path|/pixel-7-pro.svg}}"; } map $nopush $push_redirect_js { @@ -322,12 +322,6 @@ http { add_header Cache-Control "public, max-age=604800"; } - 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"; - } - location = /.well-known/matrix/client { include snippets/security-headers.conf; add_header Cross-Origin-Resource-Policy "cross-origin" always; @@ -448,6 +442,12 @@ http { add_header Cache-Control "public, max-age=604800"; } + location ~ "\.svg$" { + include snippets/security-headers.conf; + add_header Cross-Origin-Resource-Policy "same-origin" always; + add_header Cache-Control "public, max-age=31536000, immutable"; + } + location ~ "\.png$" { include snippets/security-headers.conf; # avoid breaking image hotlinking such as https://github.com/TryGhost/Ghost/issues/12880 |
