mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 12:42:16 +08:00
PERF: NGINX caching invalid when server sets cookies
This commit is contained in:
parent
535e8cac5d
commit
de3e48c16e
|
@ -163,10 +163,15 @@ server {
|
|||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $thescheme;
|
||||
|
||||
# if Set-Cookie is in the response nothing gets cached
|
||||
# this is double bad cause we are not passing last modified in
|
||||
proxy_ignore_headers "Set-Cookie";
|
||||
|
||||
# note x-accel-redirect can not be used with proxy_cache
|
||||
proxy_cache one;
|
||||
proxy_cache_valid any 1m;
|
||||
proxy_cache_valid 200 301 302 7d;
|
||||
proxy_cache_valid any 1m;
|
||||
proxy_pass http://discourse;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user