mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Merge pull request #10713 from electron/remote-node-warning-2
Tiny fix: String comparison for remote node warning
This commit is contained in:
@@ -129,7 +129,9 @@ if (nodeIntegration === 'true') {
|
||||
}
|
||||
}
|
||||
|
||||
if (/(https?)|(ftp):/.test(window.location.protocol)) {
|
||||
if (window.location.protocol === 'https:' ||
|
||||
window.location.protocol === 'http:' ||
|
||||
window.location.protocol === 'ftp:') {
|
||||
let warning = 'This renderer process has Node.js integration enabled '
|
||||
warning += 'and attempted to load remote content. This exposes users of this app to severe '
|
||||
warning += 'security risks.\n'
|
||||
|
||||
Reference in New Issue
Block a user