mirror of
https://github.com/hzrd149/nsite-gateway.git
synced 2025-06-23 12:05:01 +00:00
only use $uri as cache key
This commit is contained in:
parent
48ae3882a3
commit
a367dee259
@ -7,7 +7,7 @@ server {
|
|||||||
proxy_cache request_cache;
|
proxy_cache request_cache;
|
||||||
proxy_cache_valid 200 60m;
|
proxy_cache_valid 200 60m;
|
||||||
proxy_cache_valid 404 10m;
|
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;
|
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
|
||||||
|
|
||||||
add_header X-Cache $upstream_cache_status;
|
add_header X-Cache $upstream_cache_status;
|
||||||
@ -16,8 +16,8 @@ server {
|
|||||||
expires 30d;
|
expires 30d;
|
||||||
add_header Cache-Control "public, no-transform";
|
add_header Cache-Control "public, no-transform";
|
||||||
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_pass http://nsite;
|
proxy_pass http://nsite;
|
||||||
|
proxy_set_header Host $host;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Manual cache invalidation ( cant use proxy_cache_purge )
|
# Manual cache invalidation ( cant use proxy_cache_purge )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user