mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
defaulted credentials mode to same-origin & removed fallback credentials
Signed-off-by: AnthonyJ3 <johnsonac.3300@gmail.com>
This commit is contained in:
parent
6e2615f0b5
commit
9d8090a876
2 changed files with 2 additions and 10 deletions
|
@ -79,11 +79,6 @@ impl Request {
|
|||
// Step 2
|
||||
let mut fallback_mode: Option<NetTraitsRequestMode> = None;
|
||||
|
||||
// FIXME(cybai): As the spec changed in https://github.com/whatwg/fetch/pull/1153,
|
||||
// we will need to change the default value of credentials for
|
||||
// NetTraitsRequest and then remove fallback here.
|
||||
let mut fallback_credentials: Option<NetTraitsRequestCredentials> = None;
|
||||
|
||||
// Step 3
|
||||
let base_url = global.api_base_url();
|
||||
|
||||
|
@ -107,8 +102,6 @@ impl Request {
|
|||
temporary_request = net_request_from_global(global, url);
|
||||
// Step 5.5
|
||||
fallback_mode = Some(NetTraitsRequestMode::CorsMode);
|
||||
// FIXME(cybai): remove this line when we can remove the fallback of credentials
|
||||
fallback_credentials = Some(NetTraitsRequestCredentials::CredentialsSameOrigin);
|
||||
},
|
||||
// Step 6
|
||||
RequestInfo::Request(ref input_request) => {
|
||||
|
@ -242,8 +235,7 @@ impl Request {
|
|||
let credentials = init
|
||||
.credentials
|
||||
.as_ref()
|
||||
.map(|m| m.clone().into())
|
||||
.or(fallback_credentials);
|
||||
.map(|m| m.clone().into());
|
||||
|
||||
if let Some(c) = credentials {
|
||||
request.credentials_mode = c;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue