From cabee68bbbf5278d937aa7570f790fc1eea789e4 Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 22 Feb 2023 12:18:46 +0100 Subject: [PATCH] fix(docker): make sure the service worker and webmanifest are never cached --- docker/templates/default.conf.template | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docker/templates/default.conf.template b/docker/templates/default.conf.template index 50b2e6cef..250b8b2fa 100644 --- a/docker/templates/default.conf.template +++ b/docker/templates/default.conf.template @@ -28,6 +28,20 @@ server { add_header Cache-Control "public, max-age=0, s-maxage=0, must-revalidate" always; try_files $uri /index.html =404; } + + # Disable caching for sw + location = /sw.js { + autoindex off; + expires off; + add_header Cache-Control "public, max-age=0, s-maxage=0, must-revalidate" always; + } + + # Disable caching for webmanifest + location = /manifest.webmanifest { + autoindex off; + expires off; + add_header Cache-Control "public, max-age=0, s-maxage=0, must-revalidate" always; + } # favicon.ico location = /favicon.ico {