public static enum PolicyConfig.ClientAddressHeader extends Enum<PolicyConfig.ClientAddressHeader>
The HTTP header used to pass the client IP address from the CDN if isBehindCdn is enabled. This feature consumes the header and its value as the true client IP address. It does not create the header. Using trusted chains (for example X-Client-Ip: 11.1.1.1, 13.3.3.3), the last IP address in the list will be used as true client IP address. In case of multiple headers with the same name, the first one will be used. If the header is not present it will use the connecting IP address as the true client IP address. It’s assumed that CDN sets the correct client IP address and prevents spoofing.
- X_FORWARDED_FOR: Corresponds to X-Forwarded-For header name.
- X_CLIENT_IP: Corresponds to X-Client-Ip header name.
- X_REAL_IP: Corresponds to X-Real-Ip header name.
- CLIENT_IP: Corresponds to Client-Ip header name.
- TRUE_CLIENT_IP: Corresponds to True-Client-Ip header name.
| Enum Constant and Description |
|---|
ClientIp |
TrueClientIp |
UnknownEnumValue
This value is used if a service returns a value for this enum that is not recognized by this
version of the SDK.
|
XClientIp |
XForwardedFor |
XRealIp |
| Modifier and Type | Method and Description |
|---|---|
static PolicyConfig.ClientAddressHeader |
create(String key) |
String |
getValue() |
static PolicyConfig.ClientAddressHeader |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PolicyConfig.ClientAddressHeader[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PolicyConfig.ClientAddressHeader XForwardedFor
public static final PolicyConfig.ClientAddressHeader XClientIp
public static final PolicyConfig.ClientAddressHeader XRealIp
public static final PolicyConfig.ClientAddressHeader ClientIp
public static final PolicyConfig.ClientAddressHeader TrueClientIp
public static final PolicyConfig.ClientAddressHeader UnknownEnumValue
public static PolicyConfig.ClientAddressHeader[] values()
for (PolicyConfig.ClientAddressHeader c : PolicyConfig.ClientAddressHeader.values()) System.out.println(c);
public static PolicyConfig.ClientAddressHeader valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getValue()
public static PolicyConfig.ClientAddressHeader create(String key)
Copyright © 2016–2019. All rights reserved.