From e0e9aade4d9fe73252e83ed54ee7ff51ea66011b Mon Sep 17 00:00:00 2001 From: nscuro Date: Wed, 9 Oct 2024 22:29:33 +0200 Subject: [PATCH] Fix caching issues upon upgrade Disables caching for `index.html` and `config.json`. Assets (i.e. CSS, JS files) already have a unique value in their name for cache busting across builds. Fixes #860 Signed-off-by: nscuro --- docker/etc/nginx/templates/default.conf.template | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docker/etc/nginx/templates/default.conf.template b/docker/etc/nginx/templates/default.conf.template index c6c5ceaa4..2baaf46b6 100644 --- a/docker/etc/nginx/templates/default.conf.template +++ b/docker/etc/nginx/templates/default.conf.template @@ -7,6 +7,12 @@ server { index index.html; try_files $uri $uri/ /index.html; + location ~ (config\.json|index\.html)$ { + add_header Cache-Control "max-age=0, no-cache, no-store, must-revalidate"; + add_header Pragma "no-cache"; + add_header Expires 0; + } + sub_filter '