Add option to override webview security
This commit is contained in:
parent
b4a8ed01f1
commit
94d054cf11
7 changed files with 64 additions and 2 deletions
|
@ -101,6 +101,13 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches(
|
|||
if (web_preferences.GetBoolean(options::kNodeIntegrationInWorker, &b) && b)
|
||||
command_line->AppendSwitch(switches::kNodeIntegrationInWorker);
|
||||
|
||||
// Check if webview tag creation is overriden.
|
||||
bool enable_webview_override = false;
|
||||
web_preferences.GetBoolean(options::kEnableWebViewOverride,
|
||||
&enable_webview_override);
|
||||
command_line->AppendSwitchASCII(switches::kEnableWebViewOverride,
|
||||
enable_webview_override ? "true" : "false");
|
||||
|
||||
// If the `sandbox` option was passed to the BrowserWindow's webPreferences,
|
||||
// pass `--enable-sandbox` to the renderer so it won't have any node.js
|
||||
// integration.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue