Skip to content

Commit d66f9bd

Browse files
committed
bugfix: 임시적으로 local환경일때 쿼리스트링에 토큰 추가
1 parent e56ce76 commit d66f9bd

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/java/com/wedvice/security/SecurityConfig.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
116116
}
117117
}
118118
}
119+
119120
// ✅ 리다이렉션 쿠키 삭제
120121
ResponseCookie deleteCookie = ResponseCookie.from("loginRedirectUrl", "")
121122
.path("/")
@@ -159,7 +160,10 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
159160

160161
// ✅ 리다이렉트 처리
161162
String host = request.getHeader("Host");
162-
163+
// ✅ 쿼리스트링에 accessToken만 추가 (로컬일 때만)
164+
if (isLocalhost) {
165+
redirectUrl += "?accessToken=" + accessToken;
166+
}
163167
log.info("[success] host {}", host);
164168
log.info("[success] redirectUrl {}", redirectUrl);
165169
response.sendRedirect(redirectUrl);

0 commit comments

Comments
 (0)