Skip to content

Commit aba78bd

Browse files
committed
fix redirect cache
1 parent 60a8a04 commit aba78bd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

files/etc/nginx/sites-enabled/server.conf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ server {
6666

6767
# valid for "any" http status within 10 minutes
6868
proxy_cache_valid any 10m;
69+
proxy_cache_valid 301 302 307 0s;
70+
proxy_cache_key $request_uri;
6971

7072
# only allow GET method
7173
proxy_method GET;
@@ -226,7 +228,6 @@ server {
226228
internal;
227229

228230
proxy_pass $clean_uri;
229-
proxy_cache_key $request_uri$slice_range;
230231
include /etc/nginx/sites-enabled/proxy-hide-headers.common;
231232

232233
add_header X-ImageProxy-Cache $upstream_cache_status;
@@ -247,7 +248,6 @@ server {
247248
internal;
248249

249250
proxy_pass $clean_uri;
250-
proxy_cache_key $request_uri$slice_range;
251251
include /etc/nginx/sites-enabled/proxy-hide-headers.common;
252252

253253
add_header X-ImageProxy-Cache $upstream_cache_status;
@@ -268,6 +268,7 @@ server {
268268
location @handle_redirect {
269269
set $image_uri "$upstream_http_location";
270270
set_unescape_uri $clean_uri "http://127.0.0.1/rx/$myargs/$image_uri";
271+
proxy_cache_bypass 1;
271272
proxy_pass $clean_uri;
272273
}
273274

0 commit comments

Comments
 (0)