Commit 2760b9dd authored by rajendrant's avatar rajendrant Committed by Commit Bot

Bypass proxy for preflight request

Since the OPTIONS preflight request is generated within the network
service, it will not reach the URL loader throttles in renderer that
handle the proxy specific code.

Preflight requests apply predominantly to POST requests for which proxy
will not be used. So it makes sense to bypass proxy for preflight
requests too.

Bug: 985673
Change-Id: Iafa0db4ac0dcb29d7b38870fb4ea345f60da2212
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764748Reviewed-by: default avatarClark DuVall <cduvall@chromium.org>
Commit-Queue: rajendrant <rajendrant@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694025}
parent 9035a391
......@@ -85,7 +85,8 @@ std::unique_ptr<ResourceRequest> CreatePreflightRequest(
preflight_request->referrer_policy = request.referrer_policy;
preflight_request->credentials_mode = mojom::CredentialsMode::kOmit;
preflight_request->load_flags = RetrieveCacheFlags(request.load_flags);
preflight_request->load_flags =
RetrieveCacheFlags(request.load_flags) | net::LOAD_BYPASS_PROXY;
preflight_request->fetch_window_id = request.fetch_window_id;
preflight_request->render_frame_id = request.render_frame_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment