mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-26 01:01:00 +00:00
Only put proxy_cache where we want it
This commit is contained in:
parent
2dd5454637
commit
74edeef3f5
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue