Merge pull request #2372 from atom/allow-insecure-content
Add allowing-insecure-content option
This commit is contained in:
commit
bbce2c7e2f
2 changed files with 12 additions and 1 deletions
|
@ -439,6 +439,10 @@ void NativeWindow::OverrideWebkitPrefs(content::WebPreferences* prefs) {
|
|||
prefs->allow_displaying_insecure_content = !b;
|
||||
prefs->allow_running_insecure_content = !b;
|
||||
}
|
||||
if (web_preferences_.Get("allow-displaying-insecure-content", &b))
|
||||
prefs->allow_displaying_insecure_content = b;
|
||||
if (web_preferences_.Get("allow-running-insecure-content", &b))
|
||||
prefs->allow_running_insecure_content = b;
|
||||
if (web_preferences_.Get("extra-plugin-dirs", &list)) {
|
||||
if (content::PluginService::GetInstance()->NPAPIPluginsSupported()) {
|
||||
for (size_t i = 0; i < list.size(); ++i)
|
||||
|
|
|
@ -76,7 +76,14 @@ You can also create a window without chrome by using
|
|||
textured window. Defaults to `true`.
|
||||
* `web-preferences` Object - Settings of web page's features
|
||||
* `javascript` Boolean
|
||||
* `web-security` Boolean
|
||||
* `web-security` Boolean - When setting `false`, it will disable the same-origin
|
||||
policy(Usually using testing websites by people), and set `allow_displaying_insecure_content`
|
||||
and `allow_running_insecure_content` to `true` if these two options are not
|
||||
set by user.
|
||||
* `allow-displaying-insecure-content` Boolean - Allow a https page to display
|
||||
content like image from http URLs.
|
||||
* `allow-running-insecure-content` Boolean - Allow a https page to run JavaScript,
|
||||
CSS or plugins from http URLs.
|
||||
* `images` Boolean
|
||||
* `java` Boolean
|
||||
* `text-areas-are-resizable` Boolean
|
||||
|
|
Loading…
Reference in a new issue