Skip to content

Commit 76a5ad3

Browse files
committed
refactor: added cookies configs httpOnly and secure to false
1 parent 53c82c7 commit 76a5ad3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/com/joaov1ct0r/restful_api_users_java/modules/auth/services/CreateCookieService.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ public Cookie execute(String cookieName, String cookieValue, String domain) {
1010
int twoDaysInSeconds = 2 * 24 * 60 * 60; // 2 dias em segundos
1111
var cookie = new Cookie(cookieName, cookieValue);
1212
cookie.setDomain(domain);
13-
cookie.setHttpOnly(true);
13+
cookie.setHttpOnly(false);
14+
// cookie.setHttpOnly(true);
1415
cookie.setPath("/");
15-
cookie.setSecure(true);
16+
cookie.setSecure(false);
17+
// cookie.setSecure(true);
1618
cookie.setMaxAge(twoDaysInSeconds);
1719

1820
return cookie;

0 commit comments

Comments
 (0)