fix: all mappings should use getValidProxyModeValue (#24756)
closes #24630 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
parent
b6d5083e9b
commit
07a3def4a2
1 changed files with 3 additions and 7 deletions
|
@ -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<String> getResolveEnableForwardedHost(Optional<String> proxy, ConfigSourceInterceptorContext context) {
|
||||
return of(String.valueOf(!ProxyOptions.Mode.none.name().equals(proxy)));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue