mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-04-19 11:11:18 +00:00
set server.servlet.session.timeout back
This commit is contained in:
parent
fe4d2823aa
commit
d96d85ed64
@ -24,7 +24,7 @@ import stirling.software.SPDF.config.interfaces.SessionsModelInterface;
|
||||
@Slf4j
|
||||
public class AnonymusSessionRegistry implements HttpSessionListener, SessionsInterface {
|
||||
|
||||
@Value("${server.servlet.session.timeout:120s}") // TODO: Change to 30m
|
||||
@Value("${server.servlet.session.timeout:30m}")
|
||||
private Duration defaultMaxInactiveInterval;
|
||||
|
||||
// Map for storing sessions including timestamp
|
||||
|
@ -18,11 +18,11 @@ public class AnonymusSessionService {
|
||||
|
||||
@Autowired private AnonymusSessionRegistry sessionRegistry;
|
||||
|
||||
@Value("${server.servlet.session.timeout:120s}") // TODO: Change to 30m
|
||||
@Value("${server.servlet.session.timeout:30m}")
|
||||
private Duration defaultMaxInactiveInterval;
|
||||
|
||||
// Runs every minute to expire inactive sessions
|
||||
@Scheduled(cron = "0 0/1 * * * ?")
|
||||
@Scheduled(cron = "0 0/5 * * * ?")
|
||||
public void expireSessions() {
|
||||
Instant now = Instant.now();
|
||||
sessionRegistry.getAllSessions().stream()
|
||||
|
@ -36,7 +36,7 @@ public class CustomHttpSessionListener implements HttpSessionListener, SessionsI
|
||||
private final boolean loginEnabled;
|
||||
private final boolean runningEE;
|
||||
|
||||
@Value("${server.servlet.session.timeout:120s}") // TODO: Change to 30m
|
||||
@Value("${server.servlet.session.timeout:30m}")
|
||||
private Duration defaultMaxInactiveInterval;
|
||||
|
||||
public CustomHttpSessionListener(
|
||||
|
@ -29,7 +29,7 @@ public class SessionPersistentRegistry implements SessionRegistry {
|
||||
private final SessionRepository sessionRepository;
|
||||
private final boolean runningEE;
|
||||
|
||||
@Value("${server.servlet.session.timeout:120s}") // TODO: Change to 30m
|
||||
@Value("${server.servlet.session.timeout:30m}")
|
||||
private Duration defaultMaxInactiveInterval;
|
||||
|
||||
public SessionPersistentRegistry(
|
||||
|
@ -28,7 +28,7 @@ public class SessionScheduled {
|
||||
this.loginEnabledValue = loginEnabledValue;
|
||||
}
|
||||
|
||||
@Scheduled(cron = "0 0/1 * * * ?")
|
||||
@Scheduled(cron = "0 0/5 * * * ?")
|
||||
public void expireSessions() {
|
||||
Instant now = Instant.now();
|
||||
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
||||
|
Loading…
x
Reference in New Issue
Block a user