Package io.vertx.ext.web
Enum AllowForwardHeaders
- java.lang.Object
-
- java.lang.Enum<AllowForwardHeaders>
-
- io.vertx.ext.web.AllowForwardHeaders
-
- All Implemented Interfaces:
Serializable
,Comparable<AllowForwardHeaders>
public enum AllowForwardHeaders extends Enum<AllowForwardHeaders>
What kind of forward header parsing are we allowing.- Author:
- Paulo Lopes
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AllowForwardHeaders
valueOf(String name)
Returns the enum constant of this type with the specified name.static AllowForwardHeaders[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final AllowForwardHeaders NONE
No parsing shall be performed.
-
FORWARD
public static final AllowForwardHeaders FORWARD
Only process the standardForward
header as defined by https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded
-
X_FORWARD
public static final AllowForwardHeaders X_FORWARD
Only process the non standard but widely usedX-Forward-*
headers. These headers are not official standards but widely used. Users are advised to avoid them for new applications.
-
ALL
public static final AllowForwardHeaders ALL
Will process bothFORWARD
andX_FORWARD
. Be aware that mixing the 2 headers can open security holes as specially crafted requests that are not validated as proxy level can allow bypassing the proxy desired forward value. For example, a proxy will add theX-Forward-*
headers to a request but not filter out if the original request includes theForward
header.
-
-
Method Detail
-
values
public static AllowForwardHeaders[] 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 (AllowForwardHeaders c : AllowForwardHeaders.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AllowForwardHeaders 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
-
-