Skip to content

Commit

Permalink
Merge pull request #211 from cathaaaaand/dev
Browse files Browse the repository at this point in the history
fix: ์ฟ ํ‚ค ์ˆ˜์ •
  • Loading branch information
daeundada authored May 14, 2024
2 parents fac6c6a + 4dea4c2 commit 5ccbdef
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ public ResponseEntity<CommonResponse<LoginResponseDTO>> login(
LoginResponseDTO loginResponseDTO = authService.login(requestDTO);
String jwtToken = jwtUtil.createToken(loginResponseDTO.getUserId().toString()).trim();

/* // ์ฟ ํ‚ค๋ฅผ ๊ตฌ์„ฑํ•˜๋Š” ๋ฌธ์ž์—ด ์ƒ์„ฑ
// ์ฟ ํ‚ค๋ฅผ ๊ตฌ์„ฑํ•˜๋Š” ๋ฌธ์ž์—ด ์ƒ์„ฑ
String cookieValue = "Authorization=" + jwtToken
+ "; Path=/"
+ "; HttpOnly"
+ "; Secure"
+ "; Max-Age=" + (7 * 24 * 60 * 60) // ์˜ˆ: 7์ผ
+ "; SameSite=None" // ํฌ๋กœ์Šค ์‚ฌ์ดํŠธ ์š”์ฒญ์— ์ฟ ํ‚ค๋ฅผ ํฌํ•จ์‹œํ‚ค๊ธฐ ์œ„ํ•ด SameSite๋ฅผ None์œผ๋กœ ์„ค์ •
+ "; Domain=.wooriforei.info"; // ๋„๋ฉ”์ธ ์„ค์ • ์ถ”๊ฐ€
+ "; Max-Age=" + (24 * 60 * 60) // 1์ผ
+ "; SameSite=None"
+ "; Domain=.wooriforei.info";

// ์‘๋‹ต์— ์ฟ ํ‚ค ํ—ค๋” ์„ค์ •
response.setHeader("Set-Cookie", cookieValue);*/
response.setHeader("Set-Cookie", cookieValue);


response.setHeader(HttpHeaders.AUTHORIZATION, jwtToken);
Expand Down

0 comments on commit 5ccbdef

Please sign in to comment.