mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-26 07:02:48 -05:00
Add explicit security related flags to browser windows
This commit is contained in:
@@ -95,7 +95,12 @@ export default class StreamWindow extends EventEmitter {
|
||||
createView() {
|
||||
const { win, overlayView, viewActions } = this
|
||||
const view = new BrowserView({
|
||||
webPreferences: { partition: 'persist:session', sandbox: true },
|
||||
webPreferences: {
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
partition: 'persist:session',
|
||||
sandbox: true,
|
||||
},
|
||||
})
|
||||
view.setBackgroundColor('#000')
|
||||
|
||||
|
||||
@@ -81,7 +81,12 @@ async function main() {
|
||||
} else if (msg.type === 'browse') {
|
||||
if (!browseWindow || browseWindow.isDestroyed()) {
|
||||
browseWindow = new BrowserWindow({
|
||||
webPreferences: { partition: 'persist:session', sandbox: true },
|
||||
webPreferences: {
|
||||
nodeIntegration: false,
|
||||
contextIsolation: true,
|
||||
partition: 'persist:session',
|
||||
sandbox: true,
|
||||
},
|
||||
})
|
||||
}
|
||||
browseWindow.loadURL(msg.url)
|
||||
|
||||
Reference in New Issue
Block a user