diff options
author | Mark Felder <feld@FreeBSD.org> | 2019-01-10 21:29:05 +0000 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2019-01-10 21:29:05 +0000 |
commit | cc3a83a7306262d9334b8cfb30ac99c024523d54 (patch) | |
tree | 931474a6c2633ed288aff7b4c1f1e9cf8b0c9a8e /installation | |
parent | 9be539f0c1ee5722db388ccff9f039b67d4f5bab (diff) | |
download | pleroma-cc3a83a7306262d9334b8cfb30ac99c024523d54.tar.gz pleroma-cc3a83a7306262d9334b8cfb30ac99c024523d54.zip |
Fix nginx caching issues
Nginx is currently not caching data because proxy_buffering needs to be
enabled for caching to work at all, and we are receiving a Cache-Control
header from Pleroma that states "max-age=0, private, must-revalidate"
Even disregarding the Cache-Control header that should actually be set
to "public, max-age=1209600" as defined in the reverse_proxy code, we
don't want to obey this header at all as it overrides our Nginx caching
rules.
Diffstat (limited to 'installation')
-rw-r--r-- | installation/pleroma.nginx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/installation/pleroma.nginx b/installation/pleroma.nginx index 46b84fb50..a24bb0e61 100644 --- a/installation/pleroma.nginx +++ b/installation/pleroma.nginx @@ -79,8 +79,10 @@ server { proxy_cache_valid 200 206 301 304 1h; proxy_cache_lock on; proxy_ignore_client_abort on; - proxy_buffering off; + proxy_buffering on; chunked_transfer_encoding on; + proxy_ignore_headers Cache-Control; + proxy_hide_header Cache-Control; proxy_pass http://localhost:4000; } } |