diff --git a/backend/utils/common.js b/backend/utils/common.js index 797bf8b5..bfc11e9e 100644 --- a/backend/utils/common.js +++ b/backend/utils/common.js @@ -395,7 +395,8 @@ export class CommonService { } }); }; - this.readCookie = () => { + this.readCookie = (config) => { + this.appConfig.SSO = config.SSO; const exists = fs.existsSync(this.appConfig.SSO.rtlCookiePath); if (exists) { try { diff --git a/backend/utils/config.js b/backend/utils/config.js index c34f8a23..55633be0 100644 --- a/backend/utils/config.js +++ b/backend/utils/config.js @@ -343,7 +343,7 @@ export class ConfigService { this.errMsg = 'Please set rtlCookiePath value for single sign on option!'; } else { - this.common.readCookie(); + this.common.readCookie(config); } } }; diff --git a/server/utils/common.ts b/server/utils/common.ts index 165d6df5..d3f8e34d 100644 --- a/server/utils/common.ts +++ b/server/utils/common.ts @@ -413,7 +413,8 @@ export class CommonService { }); }; - public readCookie = () => { + public readCookie = (config) => { + this.appConfig.SSO = config.SSO; const exists = fs.existsSync(this.appConfig.SSO.rtlCookiePath); if (exists) { try { diff --git a/server/utils/config.ts b/server/utils/config.ts index 362a722a..ad9da570 100644 --- a/server/utils/config.ts +++ b/server/utils/config.ts @@ -321,7 +321,7 @@ export class ConfigService { if (!config.SSO.rtlCookiePath || config.SSO.rtlCookiePath.trim() === '') { this.errMsg = 'Please set rtlCookiePath value for single sign on option!'; } else { - this.common.readCookie(); + this.common.readCookie(config); } } };