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. --- perllib/FixMyStreet/App/Controller/Offline.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'perllib/FixMyStreet/App/Controller/Offline.pm') diff --git a/perllib/FixMyStreet/App/Controller/Offline.pm b/perllib/FixMyStreet/App/Controller/Offline.pm index adb3de14d..af05c585f 100644 --- a/perllib/FixMyStreet/App/Controller/Offline.pm +++ b/perllib/FixMyStreet/App/Controller/Offline.pm @@ -22,6 +22,7 @@ Offline pages Catalyst Controller - service worker handling sub service_worker : Path("/service-worker.js") { my ($self, $c) = @_; + $c->res->headers->header('Cache-Control' => 'max-age=0'); $c->res->content_type('application/javascript'); } -- cgit v1.2.3