XForwardedHeadersConfig

class XForwardedHeadersConfig

A configuration for the XForwardedHeaders plugin.

Constructors

Link copied to clipboard
fun XForwardedHeadersConfig()

Functions

Link copied to clipboard
fun extractEdgeProxy(block: (<ERROR CLASS>, XForwardedHeaderValues) -> Unit)

Custom logic to extract the value from the X-Forward-* headers when multiple values are present. You need to modify MutableOriginConnectionPoint based on headers from XForwardedHeaderValues.

Link copied to clipboard
fun skipKnownProxies(hosts: List<String>)

Removes known hosts from the end of the list and takes the last value from X-Forward-* headers when multiple values are present.

Link copied to clipboard
fun skipLastProxies(proxiesCount: Int)

Takes the proxiesCount-before-last value from the X-Forward-* headers when multiple values are present.

Link copied to clipboard
fun useFirstProxy()

Takes the first value from the X-Forward-* headers when multiple values are present.

Link copied to clipboard
fun useLastProxy()

Takes the last value from the X-Forward-* headers when multiple values are present.

Properties

Link copied to clipboard
val forHeaders: MutableList<String>

Gets headers used to identify the originating IP address of a client connecting to a server through a proxy or a load balancer.

Link copied to clipboard
val hostHeaders: ArrayList<String>

Gets headers used to identify the original host requested by the client. Default are X-Forwarded-Server and X-Forwarded-Host.

Link copied to clipboard
val httpsFlagHeaders: MutableList<String>

Gets headers used to identify whether HTTPS/TLS is used between the client and the front-end server. Default are X-Forwarded-SSL and Front-End-Https.

Link copied to clipboard
val portHeaders: MutableList<String>

Gets headers used to identify the destination port. The default is X-Forwarded-Port.

Link copied to clipboard
val protoHeaders: MutableList<String>

Gets headers used to identify the protocol (HTTP or HTTPS) that a client used to connect to a proxy or load balancer. Default are X-Forwarded-Proto and X-Forwarded-Protocol.