Skip to content

A platform for community discussion. Free, open, simple.

correct multisite bleed in proxy cache

Samabf0b1c5bd8a
diff --git a/config/nginx.sample.conf b/config/nginx.sample.conf
index ee7b0fea7c3..24e8646950c 100644
--- a/config/nginx.sample.conf
+++ b/config/nginx.sample.conf
@@ -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 "";