Skip to content

Commit

Permalink
BE - 로그인 시 브라우저에 쿠키 남지 않던 오류 추가 수정(#93) (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktykty0722 authored Feb 10, 2023
1 parent 1615b7a commit aa72bae
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ public ResponseEntity<?> login(@Valid @RequestBody UserLoginReq userLoginReq, Ht
HttpSession httpSession = httpServletRequest.getSession(true);
httpSession.setAttribute("User", loginUser);
ResponseCookie responseCookie = ResponseCookie.from("JSESSIONID", httpSession.getId())
.domain("backend.amatta.site")
.httpOnly(true)
.path("/")
.secure(true)
.sameSite("None")
.build();
httpServletResponse.addHeader("Set-Cookie", responseCookie.toString());
return new ResponseEntity<>(new UserLoginRes(true), HttpStatus.OK);
Expand Down

0 comments on commit aa72bae

Please sign in to comment.