Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ const SECURITY_OPTIONS = {
* Reference: https://electronjs.org/docs/tutorial/security
*/
devTools: !IS_PROD,
/**
* Disable Electron's remote module.
*/
enableRemoteModule: false,
/**
* `nodeIntegration` when enabled allows the software to use Electron's APIs
* and gain access to Node.js. It must be disabled to restricting access to
Expand Down Expand Up @@ -173,7 +177,6 @@ const SECURITY_OPTIONS = {
* Reference: https://doyensec.com/resources/us-17-Carettoni-Electronegativity-A-Study-Of-Electron-Security-wp.pdf
*/
sandbox: true, // Do not set to false. Run electron with `electron --enable-sandbox` to sandbox all BrowserWindow instances
enableRemoteModule: true, // Remote is required in fether-react parityStore.js
// Enables same origin policy to prevent execution of insecure code. Do not set to false
webSecurity: true,
allowRunningInsecureContent: false, // Do not set to true
Expand Down
4 changes: 2 additions & 2 deletions packages/fether-electron/static/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
* https://github.com/electron/electron/issues/13130
*/

const { ipcRenderer, remote } = require('electron');
const { ipcRenderer } = require('electron');

const RENDERER_ORIGIN =
remote.getGlobal('IS_PROD') === true ? 'file://' : 'http://localhost:3000';
process.env.NODE_ENV === 'development' ? 'http://localhost:3000' : 'file://';

/**
* Handler that receives an IPC message from the main process, and passes it
Expand Down