Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

disable nodeintegration #453

Merged
merged 13 commits into from
Jun 6, 2018
6 changes: 6 additions & 0 deletions backend/main.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ app.on('ready', () => {
if (!url.startsWith(HTTP_URL)) event.preventDefault();
});

// prevent navigation out of HTTP_URL
// see https://electronjs.org/docs/api/web-contents#event-will-navigate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor 🐐 The link is wrong .. should link to "new-window"

mainWindow.webContents.on('new-window', (event, url) => {
if (!url.startsWith(HTTP_URL)) event.preventDefault();
});

mainWindow.on('closed', () => {
mainWindow = null;
});
Expand Down