fix: flash plugin (#22072)

* fix: flash plugin

Fixes https://github.com/electron/electron/issues/20744

* cleanup

* fix linting issue
This commit is contained in:
t57ser 2020-02-09 02:50:07 +01:00 committed by GitHub
parent 058222a9f1
commit 43592f8b71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"
@ -154,6 +155,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;