diff --git a/console-ui/src/globalLib.js b/console-ui/src/globalLib.js index c2542702d..9356fabeb 100644 --- a/console-ui/src/globalLib.js +++ b/console-ui/src/globalLib.js @@ -517,6 +517,7 @@ const request = (function(_global) { const _LOGINPAGE_ENABLED = localStorage.getItem(LOGINPAGE_ENABLED); + let accessTokenInHeader = ''; if (_LOGINPAGE_ENABLED !== 'false') { let token = {}; try { @@ -526,7 +527,7 @@ const request = (function(_global) { goLogin(); } const { accessToken = '' } = token; - params.push(`accessToken=${accessToken}`); + accessTokenInHeader = accessToken; } return $.ajax( @@ -540,6 +541,7 @@ const request = (function(_global) { }, headers: { Authorization: localStorage.getItem('token'), + AccessToken: accessTokenInHeader, }, }) ).then( diff --git a/console-ui/src/utils/request.js b/console-ui/src/utils/request.js index efc8a0f78..fd07b92e6 100644 --- a/console-ui/src/utils/request.js +++ b/console-ui/src/utils/request.js @@ -49,7 +49,6 @@ const request = () => { goLogin(); } const { accessToken = '', username = '' } = token; - config.params.accessToken = accessToken; // support #3548 and fix #5835 if (!url.includes('auth')) { config.params.username = username; diff --git a/console/src/main/resources/static/index.html b/console/src/main/resources/static/index.html index 69d2a5ca0..d865b2bdc 100644 --- a/console/src/main/resources/static/index.html +++ b/console/src/main/resources/static/index.html @@ -35,7 +35,7 @@ - +
@@ -56,6 +56,6 @@ - +