diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2021-05-18 02:45:10 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2021-05-18 02:45:10 -0400 |
| commit | ca24fdebc51df8b61d0204db3f4d72b5a4a11eaf (patch) | |
| tree | d74482e77e940551a4e5129aee868b51a5d9ef77 /nginx | |
| parent | ea67f9c6b2fb421686147fd4040e76a49010568d (diff) | |
use prefix match for fonts instead of regex
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 0067d31e..f5e31702 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -238,6 +238,14 @@ http { return 301 /; } + location ^~ /fonts/ { + include snippets/security-headers.conf; + add_header Cross-Origin-Resource-Policy "same-origin" always; + add_header Cache-Control "public, max-age=31536000, immutable"; + gzip_static off; + brotli_static off; + } + location ~ "\.webmanifest$" { include snippets/security-headers.conf; add_header Cross-Origin-Resource-Policy "same-origin" always; @@ -257,14 +265,6 @@ http { add_header Cache-Control "public, max-age=31536000"; } - location ~ "\.woff2$" { - include snippets/security-headers.conf; - add_header Cross-Origin-Resource-Policy "same-origin" always; - add_header Cache-Control "public, max-age=31536000, immutable"; - gzip_static off; - brotli_static off; - } - location ~ "\.png$" { include snippets/security-headers.conf; # avoid breaking image hotlinking such as https://github.com/TryGhost/Ghost/issues/12880 |
