caching stuff

This commit is contained in:
Matthias Wirth
2024-05-15 21:41:42 +02:00
parent 3985ae06a3
commit d401ba3709
2 changed files with 3 additions and 5 deletions

View File

@@ -38,8 +38,7 @@ $HTTP["url"] =~ "^/INSTANCE/chunks/chunk_.*gz$" {
$HTTP["url"] =~ "^/INSTANCE/chunks/current_.*gz$" {
setenv.add-response-header += (
"Access-Control-Allow-Origin" => "*",
"Cache-Control" => "must-revalidate",
"CDN-Cache-Control" => "public, no-cache",
"Cache-Control" => "no-cache",
"Content-Encoding" => "gzip",
"Content-Type" => "application/json",
)
@@ -93,7 +92,7 @@ $HTTP["url"] =~ "^/INSTANCE/aircraft_sil" {
$HTTP["url"] =~ "^/INSTANCE/config.js$" {
setenv.add-response-header += (
"Cache-Control" => "public, must-revalidate",
"Cache-Control" => "no-cache",
)
}
$HTTP["url"] =~ "^/INSTANCE/(?!config)[^/]*\.js$" {

View File

@@ -78,8 +78,7 @@ location /INSTANCE/chunks/ {
}
location ~ current_.*\.gz$ {
gzip off;
add_header Cache-Control "must-revalidate";
add_header CDN-Cache-Control "public, no-cache";
add_header Cache-Control "no-cache";
add_header Content-Type "application/json";
add_header Content-Encoding "gzip";
}