Skip to content

Commit

Permalink
Read tenant url parameter outside of interceptor scope
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Jul 18, 2024
1 parent dbf135a commit e2fdc20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ if (UrlParams.getParam('config:autologin') !== undefined) {
function renderApp() {

if (UrlParams.getParam('config:tenant') !== undefined) {
const pair = UrlParams.getParam('config:tenant').split("=");
UrlParams.updateParams({'config:tenant': undefined});
// Add tenant header request interceptor
axios.interceptors.request.use((reqconfig) => {
const pair = UrlParams.getParam('config:tenant').split("=");
UrlParams.updateParams({'config:tenant': undefined});
reqconfig.headers[pair[0]] = pair[1];
return reqconfig;
});
Expand Down

0 comments on commit e2fdc20

Please sign in to comment.