Only put proxy_cache where we want it
This commit is contained in:
parent
2dd5454637
commit
74edeef3f5
|
@ -35,7 +35,6 @@ http {
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_cache takahe;
|
|
||||||
|
|
||||||
# Serves static files from the collected dir
|
# Serves static files from the collected dir
|
||||||
location /static/ {
|
location /static/ {
|
||||||
|
@ -52,6 +51,7 @@ http {
|
||||||
# Proxies media and remote media with caching
|
# Proxies media and remote media with caching
|
||||||
location ~* ^/(media|proxy) {
|
location ~* ^/(media|proxy) {
|
||||||
# Cache media and proxied resources
|
# Cache media and proxied resources
|
||||||
|
proxy_cache takahe;
|
||||||
proxy_cache_key $host$uri;
|
proxy_cache_key $host$uri;
|
||||||
proxy_cache_valid 200 304 4h;
|
proxy_cache_valid 200 304 4h;
|
||||||
proxy_cache_valid 301 307 4h;
|
proxy_cache_valid 301 307 4h;
|
||||||
|
@ -93,6 +93,7 @@ http {
|
||||||
add_header X-Takahe-Accel "HIT";
|
add_header X-Takahe-Accel "HIT";
|
||||||
|
|
||||||
# Cache these responses too
|
# Cache these responses too
|
||||||
|
proxy_cache takahe;
|
||||||
proxy_cache_key $takahe_realuri;
|
proxy_cache_key $takahe_realuri;
|
||||||
proxy_cache_valid 200 304 720h;
|
proxy_cache_valid 200 304 720h;
|
||||||
proxy_cache_valid 301 307 12h;
|
proxy_cache_valid 301 307 12h;
|
||||||
|
|
Loading…
Reference in New Issue