Commit 7a4f6d2f authored by Nate Fischer's avatar Nate Fischer Committed by Commit Bot

AW NS: include variations headers in CORS-exempt headers

WebView needs to add variations-specific headers to the CORS-exempt
headers list, otherwise we may trigger excessive CORS preflight checks.

Bug: 990072
Test: Enable "OutOfBlinkCors", WebView still seems to work
Change-Id: I9ad69dd52fc53bbbce01a33724050322b642a70a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1731555
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683677}
parent ba20f3c9
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "components/safe_browsing/common/safe_browsing_prefs.h" #include "components/safe_browsing/common/safe_browsing_prefs.h"
#include "components/url_formatter/url_fixer.h" #include "components/url_formatter/url_fixer.h"
#include "components/user_prefs/user_prefs.h" #include "components/user_prefs/user_prefs.h"
#include "components/variations/net/variations_http_headers.h"
#include "components/visitedlink/browser/visitedlink_master.h" #include "components/visitedlink/browser/visitedlink_master.h"
#include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
...@@ -426,7 +427,10 @@ AwBrowserContext::GetNetworkContextParams( ...@@ -426,7 +427,10 @@ AwBrowserContext::GetNetworkContextParams(
context_params->check_clear_text_permitted = context_params->check_clear_text_permitted =
AwContentBrowserClient::get_check_cleartext_permitted(); AwContentBrowserClient::get_check_cleartext_permitted();
// Update the cors_exempt_header_list to include internally-added headers, to
// avoid triggering CORS checks.
content::UpdateCorsExemptHeader(context_params.get()); content::UpdateCorsExemptHeader(context_params.get());
variations::UpdateCorsExemptHeaderForVariations(context_params.get());
// Add proxy settings // Add proxy settings
AwProxyConfigMonitor::GetInstance()->AddProxyToNetworkContextParams( AwProxyConfigMonitor::GetInstance()->AddProxyToNetworkContextParams(
......
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