🔧 String comparison

This commit is contained in:
Felix Rieseberg 2017-10-07 08:26:32 -07:00
parent 242e097e9b
commit 2bd8877be3

View file

@ -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'