mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
fix: SDA-2287 (Only create context bridge when CI is enabled and create new config filed for defining origin) (#1036)
* SDA-2287 - Only create context bridge when CI is enabled and create new config filed for defining origin * SDA-2287 - Revert loading context bridge as it is not necessary
This commit is contained in:
parent
589bc1f8e5
commit
81c67a1e08
@ -10,6 +10,7 @@
|
||||
"memoryThreshold": "800",
|
||||
"devToolsEnabled": true,
|
||||
"contextIsolation": true,
|
||||
"contextOriginUrl": "",
|
||||
"disableGpu": false,
|
||||
"enableRendererLogs": false,
|
||||
"ctWhitelist": [],
|
||||
|
@ -42,6 +42,7 @@ export interface IConfig {
|
||||
}
|
||||
|
||||
export interface IGlobalConfig {
|
||||
contextOriginUrl: string;
|
||||
url: string;
|
||||
contextIsolation: boolean;
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ export class WindowHandler {
|
||||
this.config = config.getConfigFields([ 'isCustomTitleBar', 'mainWinPos', 'minimizeOnClose', 'notificationSettings', 'alwaysOnTop', 'locale', 'customFlags', 'clientSwitch' ]);
|
||||
logger.info(`window-handler: main windows initialized with following config data`, this.config);
|
||||
|
||||
this.globalConfig = config.getGlobalConfigFields([ 'url', 'contextIsolation' ]);
|
||||
this.globalConfig = config.getGlobalConfigFields([ 'url', 'contextIsolation', 'contextOriginUrl' ]);
|
||||
this.userConfig = config.getUserConfigFields([ 'url' ]);
|
||||
|
||||
const { customFlags } = this.config;
|
||||
@ -296,7 +296,7 @@ export class WindowHandler {
|
||||
// update version info from server
|
||||
this.updateVersionInfo();
|
||||
// need this for postMessage origin
|
||||
this.mainWindow.origin = this.url;
|
||||
this.mainWindow.origin = this.globalConfig.contextOriginUrl || this.url;
|
||||
|
||||
// Event needed to hide native menu bar on Windows 10 as we use custom menu bar
|
||||
this.mainWindow.webContents.once('did-start-loading', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user