Skip to content

Commit

Permalink
Set Origin header instead of AccessControlAllowOrigin in ResourceFetc…
Browse files Browse the repository at this point in the history
…herImpl

I think it's just got mixed up but your cross-checking is appreciated.

Bug: N/A
Change-Id: I88ee161bdadcf732a01082906d87848fd52a90df
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1621789
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662034}
  • Loading branch information
kinu authored and Commit Bot committed May 22, 2019
1 parent 97d0b17 commit 15b783d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions content/renderer/fetchers/resource_fetcher_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
namespace {

constexpr int32_t kRoutingId = 0;
const char kAccessControlAllowOriginHeader[] = "Access-Control-Allow-Origin";

} // namespace

Expand Down Expand Up @@ -317,7 +316,7 @@ void ResourceFetcherImpl::Start(
if (!frame->GetDocument().GetSecurityOrigin().IsNull()) {
request_.request_initiator =
static_cast<url::Origin>(frame->GetDocument().GetSecurityOrigin());
SetHeader(kAccessControlAllowOriginHeader,
SetHeader(net::HttpRequestHeaders::kOrigin,
blink::WebSecurityOrigin::CreateUnique().ToString().Ascii());
}
request_.resource_type =
Expand Down

0 comments on commit 15b783d

Please sign in to comment.