diff --git a/user/src/main/java/com/weather/user/security/handler/LoginSuccessHandler.java b/user/src/main/java/com/weather/user/security/handler/LoginSuccessHandler.java index a817937..4927aca 100644 --- a/user/src/main/java/com/weather/user/security/handler/LoginSuccessHandler.java +++ b/user/src/main/java/com/weather/user/security/handler/LoginSuccessHandler.java @@ -44,14 +44,14 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo result = result.replace("}", ", \"token\": \"" + token + "\"}"); Cookie cookieToken = new Cookie("token", token); - cookieToken.setHttpOnly(true); // JavaScript를 통한 쿠키 접근을 막기 위해 사용 + cookieToken.setHttpOnly(false); // JavaScript를 통한 쿠키 접근을 막기 위해 사용 cookieToken.setMaxAge(3 * 60 * 60); cookieToken.setSecure(true); response.addCookie(cookieToken); String userinfo = authUserDTO.getEmail() + "|" + authUserDTO.getName() + "|" + authUserDTO.getImage(); Cookie cookieUserinfo = new Cookie("userinfo", userinfo); - cookieUserinfo.setHttpOnly(true); + cookieUserinfo.setHttpOnly(false); cookieUserinfo.setSecure(true); cookieUserinfo.setMaxAge(3 * 60 * 60); response.addCookie(cookieUserinfo);