Add support for --unsafely-treat-insecure-origin-as-secure flag (issue #2574)
This commit is contained in:
parent
1a86240c93
commit
7ecc5d31ea
|
@ -705,6 +705,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
|||
switches::kPpapiFlashPath,
|
||||
switches::kPpapiFlashVersion,
|
||||
switches::kUncaughtExceptionStackSize,
|
||||
switches::kUnsafelyTreatInsecureOriginAsSecure,
|
||||
};
|
||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
|
||||
arraysize(kSwitchNames));
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
#include "build/build_config.h"
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "chrome/common/constants.mojom.h"
|
||||
#include "chrome/common/secure_origin_whitelist.h"
|
||||
#include "chrome/common/url_constants.h"
|
||||
#include "chrome/renderer/chrome_content_renderer_client.h"
|
||||
#include "chrome/renderer/loadtimes_extension_bindings.h"
|
||||
|
@ -409,6 +410,12 @@ void CefContentRendererClient::RenderThreadStarted() {
|
|||
pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get());
|
||||
}
|
||||
|
||||
for (auto& origin_or_hostname_pattern :
|
||||
secure_origin_whitelist::GetWhitelist()) {
|
||||
blink::WebSecurityPolicy::AddOriginTrustworthyWhiteList(
|
||||
blink::WebString::FromUTF8(origin_or_hostname_pattern));
|
||||
}
|
||||
|
||||
if (extensions::ExtensionsEnabled())
|
||||
extensions_renderer_client_->RenderThreadStarted();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue