From 74edeef3f546dfa99c28e67d0c701ec06062f345 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Thu, 22 Dec 2022 05:09:33 +0000 Subject: [PATCH] Only put proxy_cache where we want it --- docker/nginx.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/nginx.conf b/docker/nginx.conf index f526d62..0bda742 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -35,7 +35,6 @@ http { proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; - proxy_cache takahe; # Serves static files from the collected dir location /static/ { @@ -52,6 +51,7 @@ http { # Proxies media and remote media with caching location ~* ^/(media|proxy) { # Cache media and proxied resources + proxy_cache takahe; proxy_cache_key $host$uri; proxy_cache_valid 200 304 4h; proxy_cache_valid 301 307 4h; @@ -93,6 +93,7 @@ http { add_header X-Takahe-Accel "HIT"; # Cache these responses too + proxy_cache takahe; proxy_cache_key $takahe_realuri; proxy_cache_valid 200 304 720h; proxy_cache_valid 301 307 12h;