mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 13:09:18 +08:00
correct multisite bleed in proxy cache
This commit is contained in:
parent
4c6d2ed59a
commit
abf0b1c5bd
|
@ -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 "";
|
||||
|
|
Loading…
Reference in New Issue
Block a user