mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1111834 - CORS request after preflight should not follow 30x redirect (r=sicking)
This commit is contained in:
parent
94bc746272
commit
042c87324b
@ -1217,6 +1217,12 @@ Navigator::SendBeacon(const nsAString& aUrl,
|
||||
!contentType.Equals(APPLICATION_WWW_FORM_URLENCODED) &&
|
||||
!contentType.Equals(MULTIPART_FORM_DATA) &&
|
||||
!contentType.Equals(TEXT_PLAIN)) {
|
||||
|
||||
// we need to set the sameOriginChecker as a notificationCallback
|
||||
// so we can tell the channel not to follow redirects
|
||||
nsCOMPtr<nsIInterfaceRequestor> soc = nsContentUtils::SameOriginChecker();
|
||||
channel->SetNotificationCallbacks(soc);
|
||||
|
||||
nsCOMPtr<nsIChannel> preflightChannel;
|
||||
nsTArray<nsCString> unsafeHeaders;
|
||||
unsafeHeaders.AppendElement(NS_LITERAL_CSTRING("Content-Type"));
|
||||
|
Loading…
Reference in New Issue
Block a user