correct multisite bleed in proxy cache

This commit is contained in:
Sam 2018-04-11 11:02:03 +10:00
parent 4c6d2ed59a
commit abf0b1c5bd
1 changed files with 7 additions and 1 deletions

View File

@ -202,9 +202,12 @@ server {
# this is double bad cause we are not passing last modified in
proxy_ignore_headers "Set-Cookie";
proxy_hide_header "Set-Cookie";
proxy_hide_header "X-Discourse-Username";
proxy_hide_header "X-Runtime";
# note x-accel-redirect can not be used with proxy_cache
proxy_cache one;
proxy_cache_key "$scheme,$host,$request_uri";
proxy_cache_valid 200 301 302 7d;
proxy_cache_valid any 1m;
proxy_pass http://discourse;
@ -221,9 +224,12 @@ server {
# client
proxy_ignore_headers "Set-Cookie";
proxy_hide_header "Set-Cookie";
proxy_hide_header "X-Discourse-Username";
proxy_hide_header "X-Runtime";
proxy_cache one;
proxy_cache_key $uri;
# shared in multisite
proxy_cache_key $request_uri;
proxy_cache_valid 200 7d;
proxy_cache_valid 404 1m;
proxy_set_header Connection "";