From 90bf459c12915d92c27e182f83da35679e6eeb4a Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Mon, 15 Jul 2019 23:25:12 +0200 Subject: [PATCH] Cache all requests if possible --- templates/nginx.conf | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/templates/nginx.conf b/templates/nginx.conf index 7aca70e..cb95967 100644 --- a/templates/nginx.conf +++ b/templates/nginx.conf @@ -69,15 +69,12 @@ http { proxy_send_timeout 600; proxy_read_timeout 600; send_timeout 600; - } - location ~ ^/(static/(thumbnails|previews|avatars)|client)/ { - proxy_pass http://peertube:9000; + proxy_cache peertube_cache; proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; proxy_cache_revalidate on; - proxy_cache_min_uses 3; proxy_cache_lock on; - add_header X-Cached $upstream_cache_status; + #add_header X-Cached $upstream_cache_status; } location ~ ^/static/(webseed|redundancy)/ { # NOTE: Its not possible to use proxy_cache for files that are served from disk without complicated workarounds