Package io.quarkus.vertx.http.runtime
Class ProxyConfig
- java.lang.Object
-
- io.quarkus.vertx.http.runtime.ProxyConfig
-
public class ProxyConfig extends Object
Holds configuration related with proxy addressing forward.
-
-
Field Summary
Fields Modifier and Type Field Description booleanallowForwardedIf this is true and proxy address forwarding is enabled then the standardForwardedheader will be used.Optional<Boolean>allowXForwardedIf either this orallow-forwardedare true and proxy address forwarding is enabled then the not standardForwardedheader will be used.booleanenableForwardedHostEnable override the received request's host through a forwarded host header.booleanenableForwardedPrefixEnable prefix the received request's path with a forwarded prefix header.StringforwardedHostHeaderConfigure the forwarded host header to be used if override enabled.StringforwardedPrefixHeaderConfigure the forwarded prefix header to be used if prefixing enabled.booleanproxyAddressForwardingIf this is true then the address, scheme etc.
-
Constructor Summary
Constructors Constructor Description ProxyConfig()
-
-
-
Field Detail
-
proxyAddressForwarding
@ConfigItem public boolean proxyAddressForwarding
If this is true then the address, scheme etc. will be set from headers forwarded by the proxy server, such asX-Forwarded-For. This should only be set if you are behind a proxy that sets these headers.
-
allowForwarded
@ConfigItem public boolean allowForwarded
If this is true and proxy address forwarding is enabled then the standardForwardedheader will be used. In case the not standardX-Forwarded-Forheader is enabled and detected on HTTP requests, the standard header has the precedence. Activating this together withquarkus.http.proxy.allow-x-forwardedhas security implications as clients can forge requests with a forwarded header that is not overwritten by the proxy. Therefore, proxies should strip unexpected `X-Forwarded` or `X-Forwarded-*` headers from the client.
-
allowXForwarded
@ConfigItem public Optional<Boolean> allowXForwarded
If either this orallow-forwardedare true and proxy address forwarding is enabled then the not standardForwardedheader will be used. In case the standardForwardedheader is enabled and detected on HTTP requests, the standard header has the precedence. Activating this together withquarkus.http.proxy.allow-x-forwardedhas security implications as clients can forge requests with a forwarded header that is not overwritten by the proxy. Therefore, proxies should strip unexpected `X-Forwarded` or `X-Forwarded-*` headers from the client.
-
enableForwardedHost
@ConfigItem(defaultValue="false") public boolean enableForwardedHost
Enable override the received request's host through a forwarded host header.
-
forwardedHostHeader
@ConfigItem(defaultValue="X-Forwarded-Host") public String forwardedHostHeader
Configure the forwarded host header to be used if override enabled.
-
enableForwardedPrefix
@ConfigItem(defaultValue="false") public boolean enableForwardedPrefix
Enable prefix the received request's path with a forwarded prefix header.
-
forwardedPrefixHeader
@ConfigItem(defaultValue="X-Forwarded-Prefix") public String forwardedPrefixHeader
Configure the forwarded prefix header to be used if prefixing enabled.
-
-