Skip to content

Commit

Permalink
Remove CORS scheme check temporarily
Browse files Browse the repository at this point in the history
The scheme check added at
https://crrev.com/43b8facd3a2fbfb8f75b455f07d64acc2c13fb5c caused some
issues on WebView. This change deletes the check temporarily.

TBR=yhirano@chromium.org

(cherry picked from commit 14314b0)

Bug: 898589
Change-Id: I6126b3b25f8700fc0547fa2c70b62bd183cc5e23
Reviewed-on: https://chromium-review.googlesource.com/c/1298828
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Richard Coles <torne@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#602736}
Reviewed-on: https://chromium-review.googlesource.com/c/1299436
Reviewed-by: Richard Coles <torne@chromium.org>
Cr-Commit-Position: refs/branch-heads/3578@{#320}
Cr-Branched-From: 4226ddf-refs/heads/master@{#599034}
  • Loading branch information
tornewuff committed Oct 25, 2018
1 parent f9402da commit cdc63f5
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -753,13 +753,8 @@ base::Optional<ResourceRequestBlockedReason> ResourceFetcher::PrepareRequest(
DCHECK(!options.cors_flag);
params.MutableOptions().cors_flag = CORS::CalculateCORSFlag(
params.Url(), origin.get(), resource_request.GetFetchRequestMode());
// Cross-origin requests are only allowed certain registered schemes.
if (options.cors_flag && !SchemeRegistry::ShouldTreatURLSchemeAsCORSEnabled(
params.Url().Protocol())) {
// This won't create a CORS related console error.
// TODO(yhirano): Fix this.
return ResourceRequestBlockedReason::kOther;
}
// TODO(yhirano): Reject requests for non CORS-enabled schemes.
// See https://crrev.com/c/1298828.
resource_request.SetAllowStoredCredentials(CORS::CalculateCredentialsFlag(
resource_request.GetFetchCredentialsMode(),
CORS::CalculateResponseTainting(
Expand Down

0 comments on commit cdc63f5

Please sign in to comment.