Skip to content

Commit 63c3b84

Browse files
committed
fix: 쿠키 도메인 변경
- 개발 서버로 도메인 변경
1 parent a762d67 commit 63c3b84

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/org/dfbf/soundlink/domain/user/service/UserService.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public class UserService {
4949
private final TokenProperties tokenProperties;
5050
private final TokenService tokenService;
5151

52+
private final String domain = "43.203.98.65";
5253

5354
// 회원가입
5455
public ResponseResult signUp(UserSignUpDto userSignUpDto) {
@@ -171,7 +172,7 @@ public ResponseResult checkEmail(String email){
171172

172173
//닉네임 중복 확인
173174
public ResponseResult checkNickName(String nickName){
174-
boolean exists =userRepository.existsByNickName(nickName);
175+
boolean exists = userRepository.existsByNickName(nickName);
175176
if(exists){
176177
return new ResponseResult(ErrorCode.DUPLICATE_NICKNAME);
177178
}
@@ -182,7 +183,7 @@ public ResponseResult checkNickName(String nickName){
182183
private ResponseCookie getRefreshToken(String refreshToken) {
183184
return ResponseCookie
184185
.from("REFRESHTOKEN", refreshToken)
185-
.domain("localhost")
186+
.domain(this.domain)
186187
.path("/")
187188
.httpOnly(true)
188189
.maxAge(tokenProperties.getRefreshTokenExpirationTime()) //만료시간 설정
@@ -227,7 +228,7 @@ public ResponseResult logout(HttpServletResponse response, HttpServletRequest re
227228
//클라이언트 - 토큰 삭제
228229
ResponseCookie refreshCookie = ResponseCookie
229230
.from("REFRESHTOKEN", "") // 추후 토큰값 추가
230-
.domain("localhost")
231+
.domain(this.domain)
231232
.path("/")
232233
.httpOnly(true)
233234
.maxAge(0)

0 commit comments

Comments
 (0)