handle more cases for the cache-control header in NGINX

This commit is contained in:
ansuz 2022-09-06 14:35:13 +05:30
parent 20a1d03006
commit 4d022a2247
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ server {
if ($args ~ ver=) { if ($args ~ ver=) {
set $cacheControl max-age=31536000; set $cacheControl max-age=31536000;
} }
if ($uri ~ ^/.*(\/|\.html)$) { if ($uri ~ ^(\/|.*\/|.*\.html)$) {
set $cacheControl no-cache; set $cacheControl no-cache;
} }
# Will not set any header if it is emptystring # Will not set any header if it is emptystring