diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2021-03-26 21:25:30 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2021-03-26 21:25:30 -0400 |
| commit | c3cd0bf24a796744e946e008496d19a408b3d3ae (patch) | |
| tree | a5bdee23b7cabe2b68f6a36d9d8741f6ccf6b7fd | |
| parent | 342a31c06cfa40be5ac50ac028578f25ce7bf0fd (diff) | |
set immutable for CSS cache header
| -rw-r--r-- | nginx/nginx.conf | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nginx/nginx.conf b/nginx/nginx.conf index f1ae783c..2575a07d 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -229,7 +229,12 @@ http { add_header Cache-Control "public, max-age=604800"; } - location ~ "\.(css|js|mjs|svg)$" { + location ~ "\.css$" { + include snippets/security-headers.conf; + add_header Cache-Control "public, max-age=31536000, immutable"; + } + + location ~ "\.(js|mjs|svg)$" { include snippets/security-headers.conf; add_header Cache-Control "public, max-age=31536000"; } |
