From bd6062645e5f83c670af535a39c30b773aca316c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=EC=9E=AC=EC=A4=91?= <126754298+m-a-king@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:36:10 +0900 Subject: [PATCH] =?UTF-8?q?feat(Cookie):=20subDomain=20cookie=20=EA=B3=B5?= =?UTF-8?q?=EC=9C=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .domain()을 통해서 서브 도메인 명시 - samesite 설정 변경 --- src/main/java/com/somemore/auth/cookie/CookieService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/somemore/auth/cookie/CookieService.java b/src/main/java/com/somemore/auth/cookie/CookieService.java index c81bee658..3c3804c95 100644 --- a/src/main/java/com/somemore/auth/cookie/CookieService.java +++ b/src/main/java/com/somemore/auth/cookie/CookieService.java @@ -28,11 +28,12 @@ public void deleteAccessToken(HttpServletResponse response) { private static ResponseCookie generateCookie(TokenType tokenType, String value) { return ResponseCookie.from(TokenType.ACCESS.name(), value) // 덮어쓰기 위해서 고정 값 + .domain(".somemore.site") .httpOnly(true) .secure(true) .path("/") .maxAge(tokenType.getPeriodInSeconds()) - .sameSite("Lax") + .sameSite("None") .build(); } }