From ba1047b1214ef952a61f606a23bd8f7125ff19f5 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sat, 27 Mar 2021 09:05:58 -0400 Subject: [PATCH] set immutable for woff2 cache headers --- nginx/nginx.conf | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 064ed1fb..91e3faa6 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -239,7 +239,14 @@ http { add_header Cache-Control "public, max-age=31536000"; } - location ~ "\.(png|woff2)$" { + location ~ "\.woff2$" { + include snippets/security-headers.conf; + add_header Cache-Control "public, max-age=31536000, immutable"; + gzip_static off; + brotli_static off; + } + + location ~ "\.png$" { include snippets/security-headers.conf; add_header Cache-Control "public, max-age=31536000"; gzip_static off;