Skip to content

The Unified and Autonomous Development Platform

fix: Session timeout setting not respected (OD-2604)

Robin Shen13d928148422
diff --git a/server-product/src/main/java/io/onedev/server/product/ProductServletConfigurator.java b/server-product/src/main/java/io/onedev/server/product/ProductServletConfigurator.java
index 6456fd6ea6..ec1885f7e0 100644
--- a/server-product/src/main/java/io/onedev/server/product/ProductServletConfigurator.java
+++ b/server-product/src/main/java/io/onedev/server/product/ProductServletConfigurator.java
@@ -35,8 +35,6 @@ import io.onedev.server.web.img.ImageScope;
import io.onedev.server.web.websocket.WebSocketService;
public class ProductServletConfigurator implements ServletConfigurator {
-
- private static final int SESSION_TIMEOUT = 300;
private final CorsFilter corsFilter;
@@ -82,9 +80,7 @@ public class ProductServletConfigurator implements ServletConfigurator {
@Override
public void configure(ServletContextHandler context) {
context.setContextPath("/");
-
- context.getSessionHandler().setMaxInactiveInterval(SESSION_TIMEOUT);
-
+
context.setInitParameter(EnvironmentLoader.ENVIRONMENT_CLASS_PARAM, DefaultWebEnvironment.class.getName());
context.addEventListener(new EnvironmentLoaderListener());