Skip to content

Commit

Permalink
core: Fixed session cookie to have a proper expiry date
Browse files Browse the repository at this point in the history
  • Loading branch information
cederberg committed Apr 25, 2024
1 parent 000ec34 commit 2408d87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/java/org/rapidcontext/core/web/Request.java
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ public void setSessionId(String sessionId, String path) {
cookie.setPath(StringUtils.prependIfMissing(path, "/"));
cookie.setSecure(request.isSecure());
// FIXME: Add when Jetty is updated: cookie.setHttpOnly(true);
cookie.setMaxAge((sessionId == null) ? 0 : (int) Session.MAX_AGE_MILLIS / 1000);
cookie.setMaxAge((sessionId == null) ? 0 : (int) (Session.MAX_AGE_MILLIS / 1000L));
response.addCookie(cookie);
}

Expand Down

0 comments on commit 2408d87

Please sign in to comment.