diff --git a/server/Recruit-Api/src/main/java/com/econovation/recruit/api/user/controller/UserController.java b/server/Recruit-Api/src/main/java/com/econovation/recruit/api/user/controller/UserController.java index 5fc59f31..dfb72cd1 100644 --- a/server/Recruit-Api/src/main/java/com/econovation/recruit/api/user/controller/UserController.java +++ b/server/Recruit-Api/src/main/java/com/econovation/recruit/api/user/controller/UserController.java @@ -61,25 +61,19 @@ public ResponseEntity login( TokenResponse tokenResponse = userLoginUseCase.execute(loginRequestDto); response.addHeader( "Set-Cookie", - new StringBuilder( - SecurityUtils.setLocalCookie( - "ACCESS_TOKEN", tokenResponse.getAccessToken()) - .toString()) - .append("; ") - .append( - SecurityUtils.setLocalCookie( - "REFRESH_TOKEN", tokenResponse.getRefreshToken())) + SecurityUtils.setLocalCookie("ACCESS_TOKEN", tokenResponse.getAccessToken()) .toString()); response.addHeader( "Set-Cookie", - new StringBuilder( - SecurityUtils.setProdCookie( - "ACCESS_TOKEN", tokenResponse.getAccessToken()) - .toString()) - .append("; ") - .append( - SecurityUtils.setProdCookie( - "REFRESH_TOKEN", tokenResponse.getRefreshToken())) + SecurityUtils.setProdCookie("ACCESS_TOKEN", tokenResponse.getAccessToken()) + .toString()); + response.addHeader( + "Set-Cookie", + SecurityUtils.setLocalCookie("REFRESH_TOKEN", tokenResponse.getRefreshToken()) + .toString()); + response.addHeader( + "Set-Cookie", + SecurityUtils.setProdCookie("REFRESH_TOKEN", tokenResponse.getRefreshToken()) .toString()); return new ResponseEntity<>(tokenResponse, HttpStatus.OK); }