code: function fixRedirectedResponse(response) {
    if (isNotRedirectedResponse(response)) {
      return Promise.resolve(response);
    }
  
    const body = 'body' in response ?
      Promise.resolve(response.body) : response.blob();
  
    return body.then(data => {
      return new Response(data, {
        headers: response.headers,
        status: response.status
      });
    });
  }
docs: Based on https://github.com/GoogleChrome/sw-precache/pull/241/files#diff-3ee9060dc7a312c6a822cac63a8c630bR85