Remove nginx cache

This commit is contained in:
nutomic 2021-03-02 13:15:06 +00:00
parent 7c5d26ecd6
commit 8eb45aa57e

View file

@ -15,9 +15,6 @@ http {
} }
} }
proxy_cache_path /var/cache/peertube_frontend levels=1:2 keys_zone=peertube_frontend_cache:10m max_size=100m use_temp_path=off;
proxy_cache_path /var/cache/peertube_video levels=1:2 keys_zone=peertube_video_cache:10m max_size={{ cache_size_gb }}g use_temp_path=off;
geo $bad_user { geo $bad_user {
default 0; default 0;
103.114.191.0/24 1; 103.114.191.0/24 1;
@ -82,14 +79,6 @@ ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECD
proxy_read_timeout 600; proxy_read_timeout 600;
send_timeout 600; send_timeout 600;
# https://www.nginx.com/blog/nginx-caching-guide/
proxy_cache peertube_frontend_cache;
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
proxy_cache_revalidate on;
proxy_cache_lock on;
proxy_cache_min_uses 5;
#add_header X-Cached $upstream_cache_status;
location ~ ^/client/(.*\.(js|css|woff2|otf|ttf|woff|eot))$ { location ~ ^/client/(.*\.(js|css|woff2|otf|ttf|woff|eot))$ {
proxy_pass http://peertube:9000; proxy_pass http://peertube:9000;
add_header Cache-Control "public, max-age=31536000, immutable"; add_header Cache-Control "public, max-age=31536000, immutable";