Top Description Fields Constructors Methods
reactor.netty.http.server

pack-priv final Class DefaultHttpForwardedHeaderHandler

extends Object
implements BiFunction<ConnectionInfo, HttpRequest, ConnectionInfo>
Class Inheritance
All Implemented Interfaces
java.util.function.BiFunction
Imports
java.util.function.BiFunction, java.util.regex.Matcher, .Pattern, io.netty.handler.codec.http.HttpRequest, reactor.netty.transport.AddressUtils

Default implementation for handling X-Forwarded/Forwarded headers.
Author
Andrey Shlykov
Since
0.9.12

Field Summary

Modifier and TypeField and Description
pack-priv static final boolean
pack-priv static final Pattern
pack-priv static final String
pack-priv static final String
FORWARDED_HEADER_VALIDATION

Specifies whether the Http Server applies a strict Forwarded header validation.

pack-priv static final Pattern
pack-priv static final Pattern
pack-priv static final DefaultHttpForwardedHeaderHandler
pack-priv static final String
pack-priv static final String
pack-priv static final String
pack-priv static final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ConnectionInfo
apply(ConnectionInfo
the first function argument
connectionInfo
,
HttpRequest
the second function argument
request
)

Implements java.util.function.BiFunction.apply.

Applies this function to the given arguments.
private ConnectionInfo
parseForwardedInfo(ConnectionInfo connectionInfo, String forwardedHeader)

private ConnectionInfo
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_FORWARDED_HEADER_VALIDATIONback to summary
pack-priv static final boolean DEFAULT_FORWARDED_HEADER_VALIDATION
FORWARDED_FOR_PATTERNback to summary
pack-priv static final Pattern FORWARDED_FOR_PATTERN
FORWARDED_HEADERback to summary
pack-priv static final String FORWARDED_HEADER
FORWARDED_HEADER_VALIDATIONback to summary
pack-priv static final String FORWARDED_HEADER_VALIDATION

Deprecated

The system property is used for backwards compatibility and will be removed in version 1.2.0.

Specifies whether the Http Server applies a strict Forwarded header validation. By default, it is enabled and strict validation is used.

Annotations
@Deprecated
Since
1.0.8
FORWARDED_HOST_PATTERNback to summary
pack-priv static final Pattern FORWARDED_HOST_PATTERN
FORWARDED_PROTO_PATTERNback to summary
pack-priv static final Pattern FORWARDED_PROTO_PATTERN
INSTANCEback to summary
pack-priv static final DefaultHttpForwardedHeaderHandler INSTANCE
X_FORWARDED_HOST_HEADERback to summary
pack-priv static final String X_FORWARDED_HOST_HEADER
X_FORWARDED_IP_HEADERback to summary
pack-priv static final String X_FORWARDED_IP_HEADER
X_FORWARDED_PORT_HEADERback to summary
pack-priv static final String X_FORWARDED_PORT_HEADER
X_FORWARDED_PROTO_HEADERback to summary
pack-priv static final String X_FORWARDED_PROTO_HEADER

Constructor Detail

DefaultHttpForwardedHeaderHandlerback to summary
pack-priv DefaultHttpForwardedHeaderHandler()

Method Detail

applyback to summary
public ConnectionInfo apply(ConnectionInfo connectionInfo, HttpRequest request)

Implements java.util.function.BiFunction.apply.

Doc from java.util.function.BiFunction.apply.

Applies this function to the given arguments.

Parameters
connectionInfo:ConnectionInfo

the first function argument

request:HttpRequest

the second function argument

Returns:ConnectionInfo

the function result

Annotations
@Override
parseForwardedInfoback to summary
private ConnectionInfo parseForwardedInfo(ConnectionInfo connectionInfo, String forwardedHeader)
parseXForwardedInfoback to summary
private ConnectionInfo parseXForwardedInfo(ConnectionInfo connectionInfo, HttpRequest request)