From 939743f7165a12a8e9be29976043deb4471b198b Mon Sep 17 00:00:00 2001 From: Jeffrey Posnick Date: Wed, 4 Jan 2017 12:19:57 -0500 Subject: [PATCH] Explicitly set `redirect: follow` on the precaching requests. (#233) --- service-worker.tmpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/service-worker.tmpl b/service-worker.tmpl index f22b4f0..bbec851 100644 --- a/service-worker.tmpl +++ b/service-worker.tmpl @@ -77,7 +77,10 @@ self.addEventListener('install', function(event) { Array.from(urlsToCacheKeys.values()).map(function(cacheKey) { // If we don't have a key matching url in the cache already, add it. if (!cachedUrls.has(cacheKey)) { - return cache.add(new Request(cacheKey, {credentials: 'same-origin'})); + return cache.add(new Request(cacheKey, { + credentials: 'same-origin', + redirect: 'follow' + })); } }) );