From adaa869c318a47bd5767aeac95992419ee71fbed Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 9 Dec 2025 18:29:24 +0100 Subject: [PATCH] :sparkles: Add better cache config on devenv nginx --- docker/devenv/files/nginx.conf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docker/devenv/files/nginx.conf b/docker/devenv/files/nginx.conf index 3a0441232e..44892be793 100644 --- a/docker/devenv/files/nginx.conf +++ b/docker/devenv/files/nginx.conf @@ -223,15 +223,20 @@ http { add_header X-Cache-Status $upstream_cache_status; } - location ~* \.(js|css|jpg|png|svg|ttf|woff|woff2|wasm)$ { + location ~* \.(jpg|png|svg|ttf|woff|woff2)$ { add_header Cache-Control "public, max-age=604800" always; # 7 days } + location ~* \.(js|css|wasm)$ { + # This only makes sense on PROD + # add_header Cache-Control "public, max-age=604800" always; # 7 days + } + location ~ ^/[^/]+/(.*)$ { return 301 " /404"; } - add_header Cache-Control "no-store, no-cache, max-age=0" always; + add_header Cache-Control "no-store" always; try_files $uri /index.html$is_args$args /index.html =404; } }