Frontend: Add Cache-Control Headers

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-02-02 21:00:24 +00:00
parent 8dc109011d
commit 29b163acda
1 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,8 @@ http {
gzip_static on;
brotli_static on;
error_page 404 /404.html;
expires 7d;
add_header Cache-Control "public, no-transform"
}
location /api/ {
@ -42,6 +44,8 @@ http {
proxy_cache_valid 200 2m; # Evaluate whether 2m or 1m is more appropriate
gzip on;
brotli on;
expires 2m;
add_header Cache-Control "private, no-transform"
}
location /api/v1/list/ {
@ -49,6 +53,8 @@ http {
proxy_cache_key $scheme://$host$uri$is_args$query_string;
proxy_ignore_headers Cache-Control;
proxy_cache_valid 200 10080m;
expires 10080m;
add_header Cache-Control "public, no-transform"
}
}
}