From b5d38bfff08a9c4ea4684b92eb2aeccdf15cf61a Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2020 10:49:43 +0900 Subject: [PATCH] fix: flash plugin (#22109) * fix: flash plugin Fixes https://github.com/electron/electron/issues/20744 * cleanup * fix linting issue Co-authored-by: t57ser --- shell/browser/net/system_network_context_manager.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shell/browser/net/system_network_context_manager.cc b/shell/browser/net/system_network_context_manager.cc index efe3c9e444d32..5347ae366d530 100644 --- a/shell/browser/net/system_network_context_manager.cc +++ b/shell/browser/net/system_network_context_manager.cc @@ -11,6 +11,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/net/chrome_mojo_proxy_resolver_factory.h" #include "content/public/browser/browser_thread.h" +#include "content/public/browser/cors_exempt_headers.h" #include "content/public/browser/network_service_instance.h" #include "content/public/common/content_features.h" #include "content/public/common/service_names.mojom.h" @@ -150,6 +151,10 @@ SystemNetworkContextManager::CreateDefaultNetworkContextParams() { network::mojom::NetworkContextParamsPtr network_context_params = network::mojom::NetworkContextParams::New(); + // This is required to avoid blocking X-Requested-With headers sent by PPAPI + // plugins, more info crbug.com/940331 + content::UpdateCorsExemptHeader(network_context_params.get()); + network_context_params->enable_brotli = true; network_context_params->enable_referrers = true;