Enum PolicyConfig.ClientAddressHeader
- java.lang.Object
-
- java.lang.Enum<PolicyConfig.ClientAddressHeader>
-
- com.oracle.bmc.waas.model.PolicyConfig.ClientAddressHeader
-
- All Implemented Interfaces:
BmcEnum
,Serializable
,Comparable<PolicyConfig.ClientAddressHeader>
- Enclosing class:
- PolicyConfig
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 Summary
Enum Constants Enum Constant 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
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Enum Constant Detail
-
XForwardedFor
public static final PolicyConfig.ClientAddressHeader XForwardedFor
-
XClientIp
public static final PolicyConfig.ClientAddressHeader XClientIp
-
XRealIp
public static final PolicyConfig.ClientAddressHeader XRealIp
-
ClientIp
public static final PolicyConfig.ClientAddressHeader ClientIp
-
TrueClientIp
public static final PolicyConfig.ClientAddressHeader TrueClientIp
-
UnknownEnumValue
public static final PolicyConfig.ClientAddressHeader UnknownEnumValue
This value is used if a service returns a value for this enum that is not recognized by this version of the SDK.
-
-
Method Detail
-
values
public static PolicyConfig.ClientAddressHeader[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PolicyConfig.ClientAddressHeader c : PolicyConfig.ClientAddressHeader.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PolicyConfig.ClientAddressHeader valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
create
public static PolicyConfig.ClientAddressHeader create(String key)
-
-