Documentation ¶
Index ¶
- Variables
- type CustomHeaderConfig
- func (*CustomHeaderConfig) Descriptor() ([]byte, []int)deprecated
- func (x *CustomHeaderConfig) GetAllowExtensionToSetAddressAsTrusted() bool
- func (x *CustomHeaderConfig) GetHeaderName() string
- func (x *CustomHeaderConfig) GetRejectWithStatus() *v3.HttpStatus
- func (*CustomHeaderConfig) ProtoMessage()
- func (x *CustomHeaderConfig) ProtoReflect() protoreflect.Message
- func (x *CustomHeaderConfig) Reset()
- func (x *CustomHeaderConfig) String() string
- func (m *CustomHeaderConfig) Validate() error
- func (m *CustomHeaderConfig) ValidateAll() error
- type CustomHeaderConfigMultiError
- type CustomHeaderConfigValidationError
- func (e CustomHeaderConfigValidationError) Cause() error
- func (e CustomHeaderConfigValidationError) Error() string
- func (e CustomHeaderConfigValidationError) ErrorName() string
- func (e CustomHeaderConfigValidationError) Field() string
- func (e CustomHeaderConfigValidationError) Key() bool
- func (e CustomHeaderConfigValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var File_envoy_extensions_http_original_ip_detection_custom_header_v3_custom_header_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CustomHeaderConfig ¶
type CustomHeaderConfig struct { // The header name containing the original downstream remote address, if present. // // Note: in the case of a multi-valued header, only the first value is tried and the rest are ignored. HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` // If set to true, the extension could decide that the detected address should be treated as // trusted by the HCM. If the address is considered :ref:`trusted<config_http_conn_man_headers_x-forwarded-for_trusted_client_address>`, // it might be used as input to determine if the request is internal (among other things). AllowExtensionToSetAddressAsTrusted bool `` /* 177-byte string literal not displayed */ // If this is set, the request will be rejected when detection fails using it as the HTTP response status. // // .. note:: // // If this is set to < 400 or > 511, the default status 403 will be used instead. RejectWithStatus *v3.HttpStatus `protobuf:"bytes,3,opt,name=reject_with_status,json=rejectWithStatus,proto3" json:"reject_with_status,omitempty"` // contains filtered or unexported fields }
This extension allows for the original downstream remote IP to be detected by reading the value from a configured header name. If the value is successfully parsed as an IP, it'll be treated as the effective downstream remote address and seen as such by all filters. See :ref:`original_ip_detection_extensions <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.original_ip_detection_extensions>` for an overview of how extensions operate and what happens when an extension fails to detect the remote IP.
[#extension: envoy.http.original_ip_detection.custom_header]
func (*CustomHeaderConfig) Descriptor
deprecated
func (*CustomHeaderConfig) Descriptor() ([]byte, []int)
Deprecated: Use CustomHeaderConfig.ProtoReflect.Descriptor instead.
func (*CustomHeaderConfig) GetAllowExtensionToSetAddressAsTrusted ¶
func (x *CustomHeaderConfig) GetAllowExtensionToSetAddressAsTrusted() bool
func (*CustomHeaderConfig) GetHeaderName ¶
func (x *CustomHeaderConfig) GetHeaderName() string
func (*CustomHeaderConfig) GetRejectWithStatus ¶
func (x *CustomHeaderConfig) GetRejectWithStatus() *v3.HttpStatus
func (*CustomHeaderConfig) ProtoMessage ¶
func (*CustomHeaderConfig) ProtoMessage()
func (*CustomHeaderConfig) ProtoReflect ¶
func (x *CustomHeaderConfig) ProtoReflect() protoreflect.Message
func (*CustomHeaderConfig) Reset ¶
func (x *CustomHeaderConfig) Reset()
func (*CustomHeaderConfig) String ¶
func (x *CustomHeaderConfig) String() string
func (*CustomHeaderConfig) Validate ¶
func (m *CustomHeaderConfig) Validate() error
Validate checks the field values on CustomHeaderConfig with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*CustomHeaderConfig) ValidateAll ¶ added in v0.10.0
func (m *CustomHeaderConfig) ValidateAll() error
ValidateAll checks the field values on CustomHeaderConfig with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CustomHeaderConfigMultiError, or nil if none found.
type CustomHeaderConfigMultiError ¶ added in v0.10.0
type CustomHeaderConfigMultiError []error
CustomHeaderConfigMultiError is an error wrapping multiple validation errors returned by CustomHeaderConfig.ValidateAll() if the designated constraints aren't met.
func (CustomHeaderConfigMultiError) AllErrors ¶ added in v0.10.0
func (m CustomHeaderConfigMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CustomHeaderConfigMultiError) Error ¶ added in v0.10.0
func (m CustomHeaderConfigMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CustomHeaderConfigValidationError ¶
type CustomHeaderConfigValidationError struct {
// contains filtered or unexported fields
}
CustomHeaderConfigValidationError is the validation error returned by CustomHeaderConfig.Validate if the designated constraints aren't met.
func (CustomHeaderConfigValidationError) Cause ¶
func (e CustomHeaderConfigValidationError) Cause() error
Cause function returns cause value.
func (CustomHeaderConfigValidationError) Error ¶
func (e CustomHeaderConfigValidationError) Error() string
Error satisfies the builtin error interface
func (CustomHeaderConfigValidationError) ErrorName ¶
func (e CustomHeaderConfigValidationError) ErrorName() string
ErrorName returns error name.
func (CustomHeaderConfigValidationError) Field ¶
func (e CustomHeaderConfigValidationError) Field() string
Field function returns field value.
func (CustomHeaderConfigValidationError) Key ¶
func (e CustomHeaderConfigValidationError) Key() bool
Key function returns key value.
func (CustomHeaderConfigValidationError) Reason ¶
func (e CustomHeaderConfigValidationError) Reason() string
Reason function returns reason value.