Fix enabling forward headers and log appender with environment variable

Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
This commit is contained in:
Rene Pfeuffer
2024-02-02 15:10:32 +01:00
parent d8081ed074
commit 28c02dfcd6
3 changed files with 6 additions and 4 deletions

View File

@@ -0,0 +1,2 @@
- type: fixed
description: Enabling forward headers and log appender with environment variable

View File

@@ -25,9 +25,9 @@
package sonia.scm.server;
public class ServerConfigYaml {
private static final String SCM_SERVER_PREFIX = "SCM_";
// ### Server
private String addressBinding = "0.0.0.0";
private int port = 8080;
@@ -161,7 +161,7 @@ public class ServerConfigYaml {
static boolean getEnvWithDefault(String envKey, boolean configValue) {
String value = getEnv(envKey);
return value != null ? Boolean.getBoolean(value) : configValue;
return value != null ? Boolean.parseBoolean(value) : configValue;
}
private static String getEnv(String envKey) {

View File

@@ -123,7 +123,7 @@ public class ServerConfigYaml {
static boolean getEnvWithDefault(String envKey, boolean configValue) {
String value = getEnv(envKey);
return value != null ? Boolean.getBoolean(value) : configValue;
return value != null ? Boolean.parseBoolean(value) : configValue;
}
private static String getEnv(String envKey) {