headers

package
v1.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_github_com_solo_io_gloo_projects_gloo_api_v1_options_headers_headers_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type EarlyHeaderManipulation added in v1.17.16

type EarlyHeaderManipulation struct {

	// Specifies a list of HTTP headers that should be added to each request
	// handled by this gateway. For more information, including
	// details on header value syntax, see the
	// [Envoy documentation](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/headers.html#) .
	HeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,1,rep,name=headers_to_add,json=headersToAdd,proto3" json:"headers_to_add,omitempty"`
	// Specifies a list of HTTP headers that should be removed from each request
	// handled by this gateway.
	HeadersToRemove []string `protobuf:"bytes,2,rep,name=headers_to_remove,json=headersToRemove,proto3" json:"headers_to_remove,omitempty"`
	// contains filtered or unexported fields
}

EarlyHeaderManipulation can be specified on Gateways to manipulate headers before significant processing has happened and routing decisions are made. Early header manipulation allows adding/removing headers that affect request processing and can be used to implement override headers. Note: The adding of headers happens before the removal of headers.

func (*EarlyHeaderManipulation) Clone added in v1.17.16

Clone function

func (*EarlyHeaderManipulation) Descriptor deprecated added in v1.17.16

func (*EarlyHeaderManipulation) Descriptor() ([]byte, []int)

Deprecated: Use EarlyHeaderManipulation.ProtoReflect.Descriptor instead.

func (*EarlyHeaderManipulation) Equal added in v1.17.16

func (m *EarlyHeaderManipulation) Equal(that interface{}) bool

Equal function

func (*EarlyHeaderManipulation) GetHeadersToAdd added in v1.17.16

func (x *EarlyHeaderManipulation) GetHeadersToAdd() []*core.HeaderValueOption

func (*EarlyHeaderManipulation) GetHeadersToRemove added in v1.17.16

func (x *EarlyHeaderManipulation) GetHeadersToRemove() []string

func (*EarlyHeaderManipulation) Hash deprecated added in v1.17.16

func (m *EarlyHeaderManipulation) Hash(hasher hash.Hash64) (uint64, error)

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*EarlyHeaderManipulation) HashUnique added in v1.18.0

func (m *EarlyHeaderManipulation) HashUnique(hasher hash.Hash64) (uint64, error)

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*EarlyHeaderManipulation) ProtoMessage added in v1.17.16

func (*EarlyHeaderManipulation) ProtoMessage()

func (*EarlyHeaderManipulation) ProtoReflect added in v1.17.16

func (x *EarlyHeaderManipulation) ProtoReflect() protoreflect.Message

func (*EarlyHeaderManipulation) Reset added in v1.17.16

func (x *EarlyHeaderManipulation) Reset()

func (*EarlyHeaderManipulation) String added in v1.17.16

func (x *EarlyHeaderManipulation) String() string

type HeaderManipulation

type HeaderManipulation struct {

	// Specifies a list of HTTP headers that should be added to each request
	// handled by this route or virtual host. For more information, including
	// details on header value syntax, see the
	// [Envoy documentation](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/headers.html#) .
	RequestHeadersToAdd []*core.HeaderValueOption `protobuf:"bytes,1,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"`
	// Specifies a list of HTTP headers that should be removed from each request
	// handled by this route or virtual host.
	RequestHeadersToRemove []string `` /* 131-byte string literal not displayed */
	// Specifies a list of HTTP headers that should be added to each response
	// handled by this route or host. For more information, including
	// details on header value syntax, see the
	// [Envoy documentation](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_conn_man/headers.html# .
	ResponseHeadersToAdd []*HeaderValueOption `protobuf:"bytes,3,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"`
	// Specifies a list of HTTP headers that should be removed from each response
	// handled by this route or virtual host.
	ResponseHeadersToRemove []string `` /* 134-byte string literal not displayed */
	// contains filtered or unexported fields
}

This plugin provides configuration options to append and remove headers from requests and responses HeaderManipulation can be specified on routes, virtual hosts, or weighted destinations

func (*HeaderManipulation) Clone added in v1.8.24

func (m *HeaderManipulation) Clone() proto.Message

Clone function

func (*HeaderManipulation) Descriptor deprecated

func (*HeaderManipulation) Descriptor() ([]byte, []int)

Deprecated: Use HeaderManipulation.ProtoReflect.Descriptor instead.

func (*HeaderManipulation) Equal

func (m *HeaderManipulation) Equal(that interface{}) bool

Equal function

func (*HeaderManipulation) GetRequestHeadersToAdd

func (x *HeaderManipulation) GetRequestHeadersToAdd() []*core.HeaderValueOption

func (*HeaderManipulation) GetRequestHeadersToRemove

func (x *HeaderManipulation) GetRequestHeadersToRemove() []string

func (*HeaderManipulation) GetResponseHeadersToAdd

func (x *HeaderManipulation) GetResponseHeadersToAdd() []*HeaderValueOption

func (*HeaderManipulation) GetResponseHeadersToRemove

func (x *HeaderManipulation) GetResponseHeadersToRemove() []string

func (*HeaderManipulation) Hash deprecated added in v1.2.13

func (m *HeaderManipulation) Hash(hasher hash.Hash64) (uint64, error)

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*HeaderManipulation) HashUnique added in v1.18.0

func (m *HeaderManipulation) HashUnique(hasher hash.Hash64) (uint64, error)

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*HeaderManipulation) ProtoMessage

func (*HeaderManipulation) ProtoMessage()

func (*HeaderManipulation) ProtoReflect added in v1.6.0

func (x *HeaderManipulation) ProtoReflect() protoreflect.Message

func (*HeaderManipulation) Reset

func (x *HeaderManipulation) Reset()

func (*HeaderManipulation) String

func (x *HeaderManipulation) String() string

type HeaderValue

type HeaderValue struct {

	// Header name.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Header value.
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Header name/value pair.

func (*HeaderValue) Clone added in v1.8.24

func (m *HeaderValue) Clone() proto.Message

Clone function

func (*HeaderValue) Descriptor deprecated

func (*HeaderValue) Descriptor() ([]byte, []int)

Deprecated: Use HeaderValue.ProtoReflect.Descriptor instead.

func (*HeaderValue) Equal

func (m *HeaderValue) Equal(that interface{}) bool

Equal function

func (*HeaderValue) GetKey

func (x *HeaderValue) GetKey() string

func (*HeaderValue) GetValue

func (x *HeaderValue) GetValue() string

func (*HeaderValue) Hash deprecated added in v1.2.13

func (m *HeaderValue) Hash(hasher hash.Hash64) (uint64, error)

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*HeaderValue) HashUnique added in v1.18.0

func (m *HeaderValue) HashUnique(hasher hash.Hash64) (uint64, error)

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*HeaderValue) ProtoMessage

func (*HeaderValue) ProtoMessage()

func (*HeaderValue) ProtoReflect added in v1.6.0

func (x *HeaderValue) ProtoReflect() protoreflect.Message

func (*HeaderValue) Reset

func (x *HeaderValue) Reset()

func (*HeaderValue) String

func (x *HeaderValue) String() string

type HeaderValueOption

type HeaderValueOption struct {

	// Header name/value pair that this option applies to.
	Header *HeaderValue `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// Specifies if the value should be appended or overwrite an existing header. Defaults to true.
	// If set to true, this maps to Envoy's `append_value: APPEND_IF_EXISTS_OR_ADD`, where the value gets be appended the header's value(s) if exists, or created if it does not.
	// If set to false, this maps to Envoy's `append_value: OVERWRITE_IF_EXISTS_OR_ADD`, where the header's value will be overwritten if it exists, or created if it does not.
	Append *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=append,proto3" json:"append,omitempty"`
	// contains filtered or unexported fields
}

Header name/value pair plus option to control append behavior.

func (*HeaderValueOption) Clone added in v1.8.24

func (m *HeaderValueOption) Clone() proto.Message

Clone function

func (*HeaderValueOption) Descriptor deprecated

func (*HeaderValueOption) Descriptor() ([]byte, []int)

Deprecated: Use HeaderValueOption.ProtoReflect.Descriptor instead.

func (*HeaderValueOption) Equal

func (m *HeaderValueOption) Equal(that interface{}) bool

Equal function

func (*HeaderValueOption) GetAppend

func (x *HeaderValueOption) GetAppend() *wrapperspb.BoolValue

func (*HeaderValueOption) GetHeader

func (x *HeaderValueOption) GetHeader() *HeaderValue

func (*HeaderValueOption) Hash deprecated added in v1.2.13

func (m *HeaderValueOption) Hash(hasher hash.Hash64) (uint64, error)

Hash function

Deprecated: due to hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions. Prefer the HashUnique function instead.

func (*HeaderValueOption) HashUnique added in v1.18.0

func (m *HeaderValueOption) HashUnique(hasher hash.Hash64) (uint64, error)

HashUnique function generates a hash of the object that is unique to the object by hashing field name and value pairs. Replaces Hash due to original hashing implemention only using field values. The omission of the field name in the hash calculation can lead to hash collisions.

func (*HeaderValueOption) ProtoMessage

func (*HeaderValueOption) ProtoMessage()

func (*HeaderValueOption) ProtoReflect added in v1.6.0

func (x *HeaderValueOption) ProtoReflect() protoreflect.Message

func (*HeaderValueOption) Reset

func (x *HeaderValueOption) Reset()

func (*HeaderValueOption) String

func (x *HeaderValueOption) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL