Frontend: Add Cache-Control Headers
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
parent
8dc109011d
commit
29b163acda
@ -33,6 +33,8 @@ http {
|
|||||||
gzip_static on;
|
gzip_static on;
|
||||||
brotli_static on;
|
brotli_static on;
|
||||||
error_page 404 /404.html;
|
error_page 404 /404.html;
|
||||||
|
expires 7d;
|
||||||
|
add_header Cache-Control "public, no-transform"
|
||||||
}
|
}
|
||||||
|
|
||||||
location /api/ {
|
location /api/ {
|
||||||
@ -42,6 +44,8 @@ http {
|
|||||||
proxy_cache_valid 200 2m; # Evaluate whether 2m or 1m is more appropriate
|
proxy_cache_valid 200 2m; # Evaluate whether 2m or 1m is more appropriate
|
||||||
gzip on;
|
gzip on;
|
||||||
brotli on;
|
brotli on;
|
||||||
|
expires 2m;
|
||||||
|
add_header Cache-Control "private, no-transform"
|
||||||
}
|
}
|
||||||
|
|
||||||
location /api/v1/list/ {
|
location /api/v1/list/ {
|
||||||
@ -49,6 +53,8 @@ http {
|
|||||||
proxy_cache_key $scheme://$host$uri$is_args$query_string;
|
proxy_cache_key $scheme://$host$uri$is_args$query_string;
|
||||||
proxy_ignore_headers Cache-Control;
|
proxy_ignore_headers Cache-Control;
|
||||||
proxy_cache_valid 200 10080m;
|
proxy_cache_valid 200 10080m;
|
||||||
|
expires 10080m;
|
||||||
|
add_header Cache-Control "public, no-transform"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user