Skip to content

Commit 9c2471a

Browse files
authored
[frontend] bugfix: preserve hash in 401 login redirect (ModelEngine-Group#486)
1 parent 07ff6e7 commit 9c2471a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/shared/http/http.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ baseAxios.interceptors.response.use(
4343
if (error.response.status === 401) {
4444
store.dispatch(setLoginStatus(false));
4545
if (error.response.headers["fit-redirect-to-prefix"]) {
46-
window.location.href = error.response.headers["fit-redirect-to-prefix"] + window.location.href;
46+
window.location.href = error.response.headers["fit-redirect-to-prefix"] + encodeURIComponent(window.location.href);
4747
} else {
4848
Message({ type: 'error', content: '登录失效且headers里面没有跳转登录的url' });
4949
}

0 commit comments

Comments
 (0)