correct multisite bleed in proxy cache

correct multisite bleed in proxy cache

diff --git a/config/nginx.sample.conf b/config/nginx.sample.conf
index ee7b0fe..24e8646 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 "";

GitHub sha: abf0b1c5

:+1:

This commit has been mentioned on Discourse Meta. There might be relevant details there: