From fc4071d089a61de05bbc88dbd8849fa92fa4b72e Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Fri, 9 Oct 2020 09:57:24 +0100 Subject: do not cache the service worker As the contents of the service worker vary depending on if the user is logged in don't cache it. --- t/app/controller/offline.t | 1 + 1 file changed, 1 insertion(+) (limited to 't/app/controller/offline.t') diff --git a/t/app/controller/offline.t b/t/app/controller/offline.t index 876475264..d48af676f 100644 --- a/t/app/controller/offline.t +++ b/t/app/controller/offline.t @@ -54,6 +54,7 @@ FixMyStreet::override_config { subtest 'service worker' => sub { $mech->get_ok('/service-worker.js'); + is $mech->res->header('Cache-Control'), 'max-age=0', 'service worker is not cached'; $mech->content_contains('translation_strings'); $mech->content_contains('offline/fallback'); }; -- cgit v1.2.3