Skip to content

Commit 9a99ff1

Browse files
authored
Merge pull request #102 from MT-TEAM-Org/fix/social-login
fix: cookie 설정 변경
2 parents e6fb59d + f2a38a4 commit 9a99ff1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/java/org/myteam/server/auth/controller/ReIssueController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public ResponseEntity<?> reissue(HttpServletRequest request, HttpServletResponse
4949
TOKEN_REISSUE_PATH,
5050
24 * 60 * 60,
5151
true,
52-
extractDomain(request.getServerName())
52+
""
5353
));
5454

5555
response.addCookie(createCookie(
@@ -58,7 +58,7 @@ public ResponseEntity<?> reissue(HttpServletRequest request, HttpServletResponse
5858
LOGOUT_PATH,
5959
24 * 60 * 60,
6060
true,
61-
extractDomain(request.getServerName())
61+
""
6262
));
6363
return new ResponseEntity<>(HttpStatus.OK);
6464
} catch (PlayHiveException e) {

src/main/java/org/myteam/server/global/util/cookie/CookieUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ public static Cookie createCookie(String key, String value, String path, int max
2323
Cookie cookie = new Cookie(key, value);
2424
cookie.setMaxAge(maxAge);
2525
// cookie.setSecure(isSecure); // Secure 설정 여부 (HTTPS에서만 사용)
26-
cookie.setPath(path);
26+
cookie.setSecure(false);
27+
cookie.setPath("/");
2728
cookie.setHttpOnly(isHttpOnly);
2829
if (domain != null) {
2930
// ex) playhive.shop

0 commit comments

Comments
 (0)