diff --git a/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/ProxyPropertyMappers.java b/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/ProxyPropertyMappers.java index 1698df33cb..a1d72829f3 100644 --- a/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/ProxyPropertyMappers.java +++ b/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/ProxyPropertyMappers.java @@ -25,17 +25,17 @@ final class ProxyPropertyMappers { fromOption(ProxyOptions.PROXY_FORWARDED_HOST) .to("quarkus.http.proxy.enable-forwarded-host") .mapFrom("proxy") - .transformer(ProxyPropertyMappers::getResolveEnableForwardedHost) + .transformer(ProxyPropertyMappers::getValidProxyModeValue) .build(), fromOption(ProxyOptions.PROXY_FORWARDED_HEADER_ENABLED) .to("quarkus.http.proxy.allow-forwarded") .mapFrom("proxy") - .transformer(ProxyPropertyMappers::getResolveEnableForwardedHost) + .transformer(ProxyPropertyMappers::getValidProxyModeValue) .build(), fromOption(ProxyOptions.PROXY_X_FORWARDED_HEADER_ENABLED) .to("quarkus.http.proxy.allow-x-forwarded") .mapFrom("proxy") - .transformer(ProxyPropertyMappers::getResolveEnableForwardedHost) + .transformer(ProxyPropertyMappers::getValidProxyModeValue) .build() }; } @@ -56,8 +56,4 @@ final class ProxyPropertyMappers { } } - private static Optional getResolveEnableForwardedHost(Optional proxy, ConfigSourceInterceptorContext context) { - return of(String.valueOf(!ProxyOptions.Mode.none.name().equals(proxy))); - } - }