From acc79c5a32c40ad6bdad9764ed5d235715d66e90 Mon Sep 17 00:00:00 2001 From: "EVOFORGE\\dimay" Date: Tue, 29 Dec 2020 15:49:29 -0500 Subject: [PATCH] #86: proper use fo request config --- skills-client-js/src/display/SkillsLevelJS.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/skills-client-js/src/display/SkillsLevelJS.js b/skills-client-js/src/display/SkillsLevelJS.js index 5bf4a55f..b3eb231e 100644 --- a/skills-client-js/src/display/SkillsLevelJS.js +++ b/skills-client-js/src/display/SkillsLevelJS.js @@ -51,10 +51,9 @@ export default class SkillsLevelJS { this._projectId = SkillsConfiguration.getProjectId(); log.debug(`SkillsClient::SkillsLevelJS::getting projectId from SkillsConfiguration: [${this._projectId}]`); } - const requestConfig = { }; + const requestConfig = { withCredentials: true }; if (!SkillsConfiguration.isPKIMode()) { const authToken = SkillsConfiguration.getAuthToken(); - requestConfig.withCredentials = true; requestConfig.headers = { Authorization: `Bearer ${authToken}` }; } axios.get(`${SkillsConfiguration.getServiceUrl()}/api/projects/${this._projectId}/level`, requestConfig)