소스 검색

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.
tags/v0.9.9
Mark Felder 5 년 전
부모
커밋
cc3a83a730
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. +3
    -1
      installation/pleroma.nginx

+ 3
- 1
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;
}
}

불러오는 중...
취소
저장