mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SDA-1938: add csrf token to 1.5 switch (#963)
Signed-off-by: Vishwas Shashidhar <vishwas.shashidhar@symphony.com>
This commit is contained in:
committed by
GitHub
parent
6b9e68d72d
commit
dda87597f1
@@ -1107,7 +1107,7 @@ export class WindowHandler {
|
||||
const csrfToken = await this.mainWindow.webContents.executeJavaScript(`localStorage.getItem('x-km-csrf-token')`);
|
||||
switch (this.currentClient) {
|
||||
case ClientSwitchType.CLIENT_1_5:
|
||||
this.url = this.startUrl;
|
||||
this.url = this.startUrl + `?x-km-csrf-token=${csrfToken}`;
|
||||
break;
|
||||
case ClientSwitchType.CLIENT_2_0:
|
||||
this.url = `https://${parsedUrl.hostname}/${manaPath}/index.html?x-km-csrf-token=${csrfToken}`;
|
||||
@@ -1116,7 +1116,7 @@ export class WindowHandler {
|
||||
this.url = `https://${parsedUrl.hostname}/${manaPath}/${manaChannel}/index.html?x-km-csrf-token=${csrfToken}`;
|
||||
break;
|
||||
default:
|
||||
this.url = this.globalConfig.url;
|
||||
this.url = this.globalConfig.url + `?x-km-csrf-token=${csrfToken}`;
|
||||
}
|
||||
await config.updateUserConfig({ clientSwitch });
|
||||
this.config.clientSwitch = clientSwitch;
|
||||
|
||||
Reference in New Issue
Block a user