public static enum HttpProtocolOptions.HeadersWithUnderscoresAction extends Enum<HttpProtocolOptions.HeadersWithUnderscoresAction> implements com.google.protobuf.ProtocolMessageEnum
Action to take when Envoy receives client request with header names containing underscore characters. Underscore character is allowed in header names by the RFC-7230 and this behavior is implemented as a security measure due to systems that treat '_' and '-' as interchangeable. Envoy by default allows client request headers with underscore characters.Protobuf enum
envoy.api.v2.core.HttpProtocolOptions.HeadersWithUnderscoresAction| Enum Constant and Description |
|---|
ALLOW
Allow headers with underscores.
|
DROP_HEADER
Drop the header with name containing underscores.
|
REJECT_REQUEST
Reject client request.
|
UNRECOGNIZED |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALLOW_VALUE
Allow headers with underscores.
|
static int |
DROP_HEADER_VALUE
Drop the header with name containing underscores.
|
static int |
REJECT_REQUEST_VALUE
Reject client request.
|
| Modifier and Type | Method and Description |
|---|---|
static HttpProtocolOptions.HeadersWithUnderscoresAction |
forNumber(int value) |
static com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptor() |
com.google.protobuf.Descriptors.EnumDescriptor |
getDescriptorForType() |
int |
getNumber() |
com.google.protobuf.Descriptors.EnumValueDescriptor |
getValueDescriptor() |
static com.google.protobuf.Internal.EnumLiteMap<HttpProtocolOptions.HeadersWithUnderscoresAction> |
internalGetValueMap() |
static HttpProtocolOptions.HeadersWithUnderscoresAction |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static HttpProtocolOptions.HeadersWithUnderscoresAction |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static HttpProtocolOptions.HeadersWithUnderscoresAction |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HttpProtocolOptions.HeadersWithUnderscoresAction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpProtocolOptions.HeadersWithUnderscoresAction ALLOW
Allow headers with underscores. This is the default behavior.
ALLOW = 0;public static final HttpProtocolOptions.HeadersWithUnderscoresAction REJECT_REQUEST
Reject client request. HTTP/1 requests are rejected with the 400 status. HTTP/2 requests end with the stream reset. The "httpN.requests_rejected_with_underscores_in_headers" counter is incremented for each rejected request.
REJECT_REQUEST = 1;public static final HttpProtocolOptions.HeadersWithUnderscoresAction DROP_HEADER
Drop the header with name containing underscores. The header is dropped before the filter chain is invoked and as such filters will not see dropped headers. The "httpN.dropped_headers_with_underscores" is incremented for each dropped header.
DROP_HEADER = 2;public static final HttpProtocolOptions.HeadersWithUnderscoresAction UNRECOGNIZED
public static final int ALLOW_VALUE
Allow headers with underscores. This is the default behavior.
ALLOW = 0;public static final int REJECT_REQUEST_VALUE
Reject client request. HTTP/1 requests are rejected with the 400 status. HTTP/2 requests end with the stream reset. The "httpN.requests_rejected_with_underscores_in_headers" counter is incremented for each rejected request.
REJECT_REQUEST = 1;public static final int DROP_HEADER_VALUE
Drop the header with name containing underscores. The header is dropped before the filter chain is invoked and as such filters will not see dropped headers. The "httpN.dropped_headers_with_underscores" is incremented for each dropped header.
DROP_HEADER = 2;public static HttpProtocolOptions.HeadersWithUnderscoresAction[] values()
for (HttpProtocolOptions.HeadersWithUnderscoresAction c : HttpProtocolOptions.HeadersWithUnderscoresAction.values()) System.out.println(c);
public static HttpProtocolOptions.HeadersWithUnderscoresAction 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 final int getNumber()
getNumber in interface com.google.protobuf.Internal.EnumLitegetNumber in interface com.google.protobuf.ProtocolMessageEnum@Deprecated public static HttpProtocolOptions.HeadersWithUnderscoresAction valueOf(int value)
forNumber(int) instead.public static HttpProtocolOptions.HeadersWithUnderscoresAction forNumber(int value)
public static com.google.protobuf.Internal.EnumLiteMap<HttpProtocolOptions.HeadersWithUnderscoresAction> internalGetValueMap()
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnumpublic final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnumpublic static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
public static HttpProtocolOptions.HeadersWithUnderscoresAction valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Copyright © 2018–2021 The Envoy Project. All rights reserved.