Auto merge of #29637 - AnthonyJ3:Use-same-origin-as-default-credential-mode-for-RequestInit-fix, r=mukilan

Use same-origin as default credential mode for RequestInit fix

<!-- Please describe your changes on the following line: -->
- Updated the default credential mode from omit to same-origin as per: https://github.com/whatwg/fetch/pull/1153
- Deleted instances of fallback credentials
---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #29633  (GitHub issue number if applicable)
- [X] There are tests for these changes
This commit is contained in:
bors-servo 2023-05-18 14:16:45 +02:00 committed by GitHub
commit afcd6c4c5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 17 deletions

View file

@ -270,7 +270,7 @@ impl RequestBuilder {
mode: RequestMode::NoCors,
cache_mode: CacheMode::Default,
use_cors_preflight: false,
credentials_mode: CredentialsMode::Omit,
credentials_mode: CredentialsMode::CredentialsSameOrigin,
use_url_credentials: false,
origin: ImmutableOrigin::new_opaque(),
referrer: referrer,
@ -517,7 +517,7 @@ impl Request {
synchronous: false,
mode: RequestMode::NoCors,
use_cors_preflight: false,
credentials_mode: CredentialsMode::Omit,
credentials_mode: CredentialsMode::CredentialsSameOrigin,
use_url_credentials: false,
cache_mode: CacheMode::Default,
redirect_mode: RedirectMode::Follow,