Skip to content

Commit

Permalink
Add CSP to shared process
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Jun 16, 2017
1 parent 062abef commit 3270218
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/vs/code/electron-browser/sharedProcess.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self';">
</head>

<body aria-label="">
Expand Down
9 changes: 8 additions & 1 deletion src/vs/code/electron-main/sharedProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ export class SharedProcess implements ISharedProcess {

@memoize
private get _whenReady(): TPromise<void> {
this.window = new BrowserWindow({ show: false });
this.window = new BrowserWindow({
show: false,
webPreferences: {
images: false,
webaudio: false,
webgl: false
}
});
const config = assign({
appRoot: this.environmentService.appRoot,
nodeCachedDataDir: this.environmentService.nodeCachedDataDir,
Expand Down

0 comments on commit 3270218

Please sign in to comment.