mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-31 09:22:49 -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() {
|
createView() {
|
||||||
const { win, overlayView, viewActions } = this
|
const { win, overlayView, viewActions } = this
|
||||||
const view = new BrowserView({
|
const view = new BrowserView({
|
||||||
webPreferences: { partition: 'persist:session', sandbox: true },
|
webPreferences: {
|
||||||
|
nodeIntegration: false,
|
||||||
|
contextIsolation: true,
|
||||||
|
partition: 'persist:session',
|
||||||
|
sandbox: true,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
view.setBackgroundColor('#000')
|
view.setBackgroundColor('#000')
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,12 @@ async function main() {
|
|||||||
} else if (msg.type === 'browse') {
|
} else if (msg.type === 'browse') {
|
||||||
if (!browseWindow || browseWindow.isDestroyed()) {
|
if (!browseWindow || browseWindow.isDestroyed()) {
|
||||||
browseWindow = new BrowserWindow({
|
browseWindow = new BrowserWindow({
|
||||||
webPreferences: { partition: 'persist:session', sandbox: true },
|
webPreferences: {
|
||||||
|
nodeIntegration: false,
|
||||||
|
contextIsolation: true,
|
||||||
|
partition: 'persist:session',
|
||||||
|
sandbox: true,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
browseWindow.loadURL(msg.url)
|
browseWindow.loadURL(msg.url)
|
||||||
|
|||||||
Reference in New Issue
Block a user