From 9934fef06ca43a0265559743beae6e433870cc78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A0=95=EB=AF=BC?= Date: Wed, 31 Jul 2024 13:50:34 +0900 Subject: [PATCH] faet: cookie --- .../com/edufocus/edufocus/user/controller/UserController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/com/edufocus/edufocus/user/controller/UserController.java b/backend/src/main/java/com/edufocus/edufocus/user/controller/UserController.java index 464020f..2f3abf4 100644 --- a/backend/src/main/java/com/edufocus/edufocus/user/controller/UserController.java +++ b/backend/src/main/java/com/edufocus/edufocus/user/controller/UserController.java @@ -101,9 +101,10 @@ public class UserController { Cookie refreshCookie = new Cookie("refresh-token", refreshToken); refreshCookie.setPath("/"); refreshCookie.setHttpOnly(true); - // refreshCookie.setSecure(true); // HTTPS에서만 전송되도록 설정 + refreshCookie.setSecure(true); // HTTPS에서만 전송되도록 설정 //r/efreshCookie.setSameSite(Cookie.SameSite.NONE); // Cross-Origin 요청에 대해 모두 전송 //refreshCookie.setSameSite("None"); // Cross-Origin 요청에 대해 모두 전송 + String cookieHeader = String.format("refresh-token=%s; Path=/; HttpOnly; Secure; SameSite=None", refreshToken); response.setHeader("Set-Cookie", cookieHeader);