From 954ed37668837bb7cb9633510a3c57a80882b6a7 Mon Sep 17 00:00:00 2001 From: Mickael Kerjean Date: Tue, 18 Feb 2020 08:20:59 +1100 Subject: [PATCH] fix (#229): remove header mutation On IOS, mutate an HTTP response would throw with the error "Headers object's guard is 'immutable". The idea of that mutation was to provide a way in frontend land to detect when a response is fresh or stale from a cache. As of today, we don't use that information so we removed the associated code --- client/worker/sw_cache.js | 1 - 1 file changed, 1 deletion(-) diff --git a/client/worker/sw_cache.js b/client/worker/sw_cache.js index 0037991c..ad64998b 100644 --- a/client/worker/sw_cache.js +++ b/client/worker/sw_cache.js @@ -97,7 +97,6 @@ function cacheFirstStrategy(event){ } fetchAndCache(event).catch(nil); - response.headers.append("Content-Stale", "yes"); return response; }); });