Skip to content

Commit

Permalink
feat: 쿠키 보안 옵션 설정 #357
Browse files Browse the repository at this point in the history
  • Loading branch information
jhon3242 committed Oct 22, 2024
1 parent e9819c8 commit 0aaf9bb
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ public RejoinCookieEncryptor(EncryptionUtils encryptionUtils, @Value("${cookie.r

public Cookie getEncodedCookie(Object value) {
String encrypt = encryptionUtils.encrypt(String.valueOf(value));
return new Cookie(rejoinKey, encrypt);
Cookie cookie = new Cookie(rejoinKey, encrypt);
cookie.setHttpOnly(true);
cookie.setSecure(true);
return cookie;
}

public Long getDecodedCookieValue(String cookieValue) {
Expand Down

0 comments on commit 0aaf9bb

Please sign in to comment.