Skip to content

Commit

Permalink
Merge pull request #122 from Na-o-man/feat/#121/cookie-subdomain-sharing
Browse files Browse the repository at this point in the history
[FEAT] 쿠키 생성 시 도메인 ".naoman.site"로 설정
  • Loading branch information
bflykky authored Aug 18, 2024
2 parents 688c408 + ae748eb commit 97d6399
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
import java.util.Base64;

public class CookieUtils {
private static final String COOKIE_DOMAIN = ".naoman.site";
public static void addCookie(HttpServletResponse response, String name, String value, int maxAge) {
ResponseCookie cookie = ResponseCookie.from(name, value)
.path("/")
.domain(COOKIE_DOMAIN)
.maxAge(maxAge)
.httpOnly(false)
.secure(true)
Expand Down

0 comments on commit 97d6399

Please sign in to comment.