This repository has been archived by the owner on Jan 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 388
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gauntface
approved these changes
Feb 7, 2017
lib/functions.js
Outdated
|
||
return bodyPromise.then(function(body) { | ||
// new Response() is happy when passed either a stream or a Blob. | ||
return new Response(body, { // eslint-disable-line no-undef |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would adding /* eslint-env browser */ fix the need for this eslint-disable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added worker
, since that's more accurate than browser
. But yeah, it takes care of it.
test/test.js
Outdated
}); | ||
|
||
it('should return the same response when redirected is false', function() { | ||
var originalResponse = new Response(responseText); // eslint-disable-line no-undef |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you use new global.Response() here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, switching.
AdamJo
added a commit
to AdamJo/everwaking
that referenced
this pull request
Feb 8, 2017
current bug with sw-prache with redirects in firebase hosting. GoogleChromeLabs/sw-precache#241
Closed
2 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
R: @addyosmani @gauntface
This handles a new security restriction around redirected responses that is coming in Chrome 59, and is already implemented in Firefox. See https://bugs.chromium.org/p/chromium/issues/detail?id=669363&desc=2#c1 for more details.
Fixes #220