public static enum PolicyConfig.ClientAddressHeader extends Enum<PolicyConfig.ClientAddressHeader> implements BmcEnum
Specifies an HTTP header name which is treated as the connecting client’s IP address.
Applicable only if isBehindCdn
is enabled.
The edge node reads this header and its value and sets the client IP address as specified. It does not create the header if the header is not present in the request. If the header is not present, the connecting IP address will be used as the client's true IP address. It uses the last IP address in the header's value as the true IP address.
Example: X-Client-Ip: 11.1.1.1, 13.3.3.3
In the case of multiple headers with the same name, only the first header will be used. It is assumed that CDN sets the correct client IP address to prevent 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 static PolicyConfig.ClientAddressHeader create(String key)
Copyright © 2016–2024. All rights reserved.