mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-18 21:42:10 +01:00
Add configuration for jetty idle timeout
Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com> Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com> Committed-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
This commit is contained in:
@@ -37,6 +37,7 @@ public class ServerConfigYaml {
|
||||
private String tempDir = "work/scm";
|
||||
// Resolves the client ip instead of the reverse proxy ip if the X-Forwarded-For header is present
|
||||
private boolean forwardHeadersEnabled = false;
|
||||
private int idleTimeout = 0;
|
||||
|
||||
// ### SSL-related config
|
||||
// Only configure SSL if the key store path is set
|
||||
@@ -149,6 +150,14 @@ public class ServerConfigYaml {
|
||||
this.forwardHeadersEnabled = forwardHeadersEnabled;
|
||||
}
|
||||
|
||||
public int getIdleTimeout() {
|
||||
return getEnvWithDefault("IDLE_TIMEOUT", idleTimeout);
|
||||
}
|
||||
|
||||
public void setIdleTimeout(int idleTimeout) {
|
||||
this.idleTimeout = idleTimeout;
|
||||
}
|
||||
|
||||
static int getEnvWithDefault(String envKey, int configValue) {
|
||||
String value = getEnv(envKey);
|
||||
return value != null ? Integer.parseInt(value) : configValue;
|
||||
|
||||
Reference in New Issue
Block a user