Skip to content

Commit

Permalink
#35 [Update] 쿠키 삭제 문제 네번째 시도
Browse files Browse the repository at this point in the history
  • Loading branch information
Anna-Jin committed Jul 19, 2022
1 parent 16b4ee0 commit 0584792
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/mpnp/baechelin/util/CookieUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public static void deleteCookie(HttpServletRequest request, HttpServletResponse
if (cookies != null && cookies.length > 0) {
for (Cookie cookie : cookies) {
if (name.equals(cookie.getName())) {
ResponseCookie deleteCookie = ResponseCookie.from(name, null)
.domain(".bae-chelin.com")
ResponseCookie deleteCookie = ResponseCookie.from(name, "")
.domain("bae-chelin.com")
.path("/")
.httpOnly(true)
.maxAge(0)
Expand All @@ -68,7 +68,7 @@ public static void deleteCookie(HttpServletRequest request, HttpServletResponse
// cookie.setPath("/");
// cookie.setMaxAge(0);

response.addHeader("Set-Cookie", cookie.toString());
response.addHeader("Set-Cookie", deleteCookie.toString());
}
}
}
Expand Down

0 comments on commit 0584792

Please sign in to comment.