From a367dee259a11a5835ec81a7689def82e3c674b5 Mon Sep 17 00:00:00 2001 From: hzrd149 Date: Thu, 26 Sep 2024 08:59:09 -0500 Subject: [PATCH] only use $uri as cache key --- nginx/default.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx/default.conf b/nginx/default.conf index 3f45859..e0d455a 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -7,7 +7,7 @@ server { proxy_cache request_cache; proxy_cache_valid 200 60m; proxy_cache_valid 404 10m; - proxy_cache_key $scheme$host$request_uri; + proxy_cache_key $uri; proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; add_header X-Cache $upstream_cache_status; @@ -16,8 +16,8 @@ server { expires 30d; add_header Cache-Control "public, no-transform"; - proxy_set_header Host $host; proxy_pass http://nsite; + proxy_set_header Host $host; } # Manual cache invalidation ( cant use proxy_cache_purge )