Skip to content

Commit

Permalink
fix: 도메인 수정으로 인한 쿠키 로그아웃 도메인 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
goathoon committed Dec 13, 2023
1 parent 96fc7b2 commit e579b7d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public static Long getUserId(CRUDType type) {

public static void logout(HttpServletRequest request, HttpServletResponse response) {
Cookie[] cookies = request.getCookies();
ResponseCookie invalidateAccessCookie = ResponseCookie.from("accessToken", "none").maxAge(0).path("/").domain(".inforum.me").sameSite("none").httpOnly(true).secure(true).build();
ResponseCookie invalidateRefreshCookie = ResponseCookie.from("refreshToken", "none").maxAge(0).path("/").domain(".inforum.me").sameSite("none").httpOnly(true).secure(true).build();
ResponseCookie invalidateAccessCookie = ResponseCookie.from("accessToken", "none").maxAge(0).path("/").domain(".inforum24.com").sameSite("none").httpOnly(true).secure(true).build();
ResponseCookie invalidateRefreshCookie = ResponseCookie.from("refreshToken", "none").maxAge(0).path("/").domain(".inforum24.com").sameSite("none").httpOnly(true).secure(true).build();
response.addHeader("Set-Cookie", invalidateAccessCookie.toString());
response.addHeader("Set-Cookie",invalidateRefreshCookie.toString());
}
Expand Down

0 comments on commit e579b7d

Please sign in to comment.