mirror of
https://github.com/discourse/discourse.git
synced 2025-06-13 01:46:29 +08:00
correct multisite bleed in proxy cache
This commit is contained in:
@ -202,9 +202,12 @@ server {
|
|||||||
# this is double bad cause we are not passing last modified in
|
# this is double bad cause we are not passing last modified in
|
||||||
proxy_ignore_headers "Set-Cookie";
|
proxy_ignore_headers "Set-Cookie";
|
||||||
proxy_hide_header "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
|
# note x-accel-redirect can not be used with proxy_cache
|
||||||
proxy_cache one;
|
proxy_cache one;
|
||||||
|
proxy_cache_key "$scheme,$host,$request_uri";
|
||||||
proxy_cache_valid 200 301 302 7d;
|
proxy_cache_valid 200 301 302 7d;
|
||||||
proxy_cache_valid any 1m;
|
proxy_cache_valid any 1m;
|
||||||
proxy_pass http://discourse;
|
proxy_pass http://discourse;
|
||||||
@ -221,9 +224,12 @@ server {
|
|||||||
# client
|
# client
|
||||||
proxy_ignore_headers "Set-Cookie";
|
proxy_ignore_headers "Set-Cookie";
|
||||||
proxy_hide_header "Set-Cookie";
|
proxy_hide_header "Set-Cookie";
|
||||||
|
proxy_hide_header "X-Discourse-Username";
|
||||||
|
proxy_hide_header "X-Runtime";
|
||||||
|
|
||||||
proxy_cache one;
|
proxy_cache one;
|
||||||
proxy_cache_key $uri;
|
# shared in multisite
|
||||||
|
proxy_cache_key $request_uri;
|
||||||
proxy_cache_valid 200 7d;
|
proxy_cache_valid 200 7d;
|
||||||
proxy_cache_valid 404 1m;
|
proxy_cache_valid 404 1m;
|
||||||
proxy_set_header Connection "";
|
proxy_set_header Connection "";
|
||||||
|
Reference in New Issue
Block a user