cookie max age from "session end" to "10 years"
This commit is contained in:
parent
962e390b5d
commit
d1521417cf
@ -89,12 +89,13 @@ public class UserService {
|
||||
}
|
||||
|
||||
private static void writeUserUuidCookie(@NonNull final HttpServletResponse response, @Nullable final User user) {
|
||||
final Cookie userUuidCookie = new Cookie(USER_UUID_COOKIE_NAME, "");
|
||||
final Cookie cookie = new Cookie(USER_UUID_COOKIE_NAME, "");
|
||||
if (user != null) {
|
||||
userUuidCookie.setValue(user.privateUuid);
|
||||
cookie.setValue(user.privateUuid);
|
||||
}
|
||||
userUuidCookie.setPath("/");
|
||||
response.addCookie(userUuidCookie);
|
||||
cookie.setMaxAge(10 * 365 * 24 * 60 * 60);
|
||||
cookie.setPath("/");
|
||||
response.addCookie(cookie);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
||||
Loading…
Reference in New Issue
Block a user