FF111 fetch() remove Authorization header on cross origin redirects #19064
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.
FF111 strips the
Authorization
header added by developers from cross-origin redirects - see https://bugzilla.mozilla.org/show_bug.cgi?id=1802086. This adds a feature to thefetch()
entry.This was tested with https://wpt.live/fetch/api/credentials/authentication-redirection.any.worker.htm - the first test should show that the header is not stripped from a normal response, the second that it is not stripped from a same-origin redirect, and the third that it is from a cross-origin redirect.
Note that Safari is "accidentally" compliant in 15.4 because it strips the authorization header in both cases. Safari 16.1 on browserstack does the "right thing" for all cases. So I have indicated Safari 16.1 because it more closely reflects the expected behaviour with this header on redirect.
I could not test deno so have set to false. Probably that is right given how recent this is.
Other docs info here: mdn/content#22533