File tree Expand file tree Collapse file tree
apps/ticket-admin/src/lib/axios Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import axios , { AxiosError , AxiosResponse , InternalAxiosRequestConfig } from "axios" ;
22
3- import { API_URL } from "@/data/constants" ;
43import { EXTERNAL_PATH } from "@/shared/constants/path" ;
54import { IS_LOGINED } from "@/shared/constants/storage" ;
65import { isAxiosErrorResponse } from "@/shared/types/axioxError" ;
@@ -113,7 +112,9 @@ function redirectToLoginOnce() {
113112 alert ( "로그인이 필요한 페이지입니다." ) ;
114113 safeLocalStorage . remove ( IS_LOGINED ) ;
115114
116- const redirectUrl = `${ EXTERNAL_PATH . LOGIN } ?redirectUrl=${ encodeURIComponent ( window . location . pathname ) } ` ;
115+ const redirectUrl = `${ EXTERNAL_PATH . LOGIN } ?redirectUrl=${ encodeURIComponent (
116+ window . location . origin + window . location . pathname + window . location . search ,
117+ ) } `;
117118
118119 window . location . href = redirectUrl ;
119120}
You can’t perform that action at this time.
0 commit comments