redirect_policyv3

package
v1.36.11-2026011520535... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const RedirectPolicy_RedirectActionSpecifier_not_set_case case_RedirectPolicy_RedirectActionSpecifier = 0
View Source
const RedirectPolicy_RedirectAction_case case_RedirectPolicy_RedirectActionSpecifier = 2
View Source
const RedirectPolicy_Uri_case case_RedirectPolicy_RedirectActionSpecifier = 1

Variables

View Source
var File_envoy_extensions_http_custom_response_redirect_policy_v3_redirect_policy_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type RedirectPolicy

type RedirectPolicy struct {

	// Types that are valid to be assigned to RedirectActionSpecifier:
	//
	//	*RedirectPolicy_Uri
	//	*RedirectPolicy_RedirectAction
	RedirectActionSpecifier isRedirectPolicy_RedirectActionSpecifier `protobuf_oneof:"redirect_action_specifier"`
	// The new response status code if specified. This is used to override the
	// status code of the response from the new upstream if it is not an error status.
	StatusCode *wrapperspb.UInt32Value `protobuf:"bytes,3,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	// HTTP headers to add to the response. This allows the
	// response policy to append, to add or to override headers of
	// the original response for local body, or the custom response from the
	// remote body, before it is sent to a downstream client.
	// Note that these are not applied if the redirected response is an error
	// response.
	ResponseHeadersToAdd []*v3.HeaderValueOption `protobuf:"bytes,4,rep,name=response_headers_to_add,json=responseHeadersToAdd,proto3" json:"response_headers_to_add,omitempty"`
	// HTTP headers to add to the request before it is internally redirected.
	RequestHeadersToAdd []*v3.HeaderValueOption `protobuf:"bytes,5,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"`
	// Custom action to modify request headers before selection of the
	// redirected route.
	// [#comment: TODO(pradeepcrao) add an extension category.]
	ModifyRequestHeadersAction *v3.TypedExtensionConfig `` /* 143-byte string literal not displayed */
	// contains filtered or unexported fields
}

Custom response policy to internally redirect the original response to a different upstream. [#next-free-field: 7]

func (*RedirectPolicy) ClearModifyRequestHeadersAction

func (x *RedirectPolicy) ClearModifyRequestHeadersAction()

func (*RedirectPolicy) ClearRedirectAction

func (x *RedirectPolicy) ClearRedirectAction()

func (*RedirectPolicy) ClearRedirectActionSpecifier

func (x *RedirectPolicy) ClearRedirectActionSpecifier()

func (*RedirectPolicy) ClearStatusCode

func (x *RedirectPolicy) ClearStatusCode()

func (*RedirectPolicy) ClearUri

func (x *RedirectPolicy) ClearUri()

func (*RedirectPolicy) GetModifyRequestHeadersAction

func (x *RedirectPolicy) GetModifyRequestHeadersAction() *v3.TypedExtensionConfig

func (*RedirectPolicy) GetRedirectAction

func (x *RedirectPolicy) GetRedirectAction() *v31.RedirectAction

func (*RedirectPolicy) GetRedirectActionSpecifier

func (x *RedirectPolicy) GetRedirectActionSpecifier() isRedirectPolicy_RedirectActionSpecifier

func (*RedirectPolicy) GetRequestHeadersToAdd

func (x *RedirectPolicy) GetRequestHeadersToAdd() []*v3.HeaderValueOption

func (*RedirectPolicy) GetResponseHeadersToAdd

func (x *RedirectPolicy) GetResponseHeadersToAdd() []*v3.HeaderValueOption

func (*RedirectPolicy) GetStatusCode

func (x *RedirectPolicy) GetStatusCode() *wrapperspb.UInt32Value

func (*RedirectPolicy) GetUri

func (x *RedirectPolicy) GetUri() string

func (*RedirectPolicy) HasModifyRequestHeadersAction

func (x *RedirectPolicy) HasModifyRequestHeadersAction() bool

func (*RedirectPolicy) HasRedirectAction

func (x *RedirectPolicy) HasRedirectAction() bool

func (*RedirectPolicy) HasRedirectActionSpecifier

func (x *RedirectPolicy) HasRedirectActionSpecifier() bool

func (*RedirectPolicy) HasStatusCode

func (x *RedirectPolicy) HasStatusCode() bool

func (*RedirectPolicy) HasUri

func (x *RedirectPolicy) HasUri() bool

func (*RedirectPolicy) ProtoMessage

func (*RedirectPolicy) ProtoMessage()

func (*RedirectPolicy) ProtoReflect

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

func (*RedirectPolicy) Reset

func (x *RedirectPolicy) Reset()

func (*RedirectPolicy) SetModifyRequestHeadersAction

func (x *RedirectPolicy) SetModifyRequestHeadersAction(v *v3.TypedExtensionConfig)

func (*RedirectPolicy) SetRedirectAction

func (x *RedirectPolicy) SetRedirectAction(v *v31.RedirectAction)

func (*RedirectPolicy) SetRequestHeadersToAdd

func (x *RedirectPolicy) SetRequestHeadersToAdd(v []*v3.HeaderValueOption)

func (*RedirectPolicy) SetResponseHeadersToAdd

func (x *RedirectPolicy) SetResponseHeadersToAdd(v []*v3.HeaderValueOption)

func (*RedirectPolicy) SetStatusCode

func (x *RedirectPolicy) SetStatusCode(v *wrapperspb.UInt32Value)

func (*RedirectPolicy) SetUri

func (x *RedirectPolicy) SetUri(v string)

func (*RedirectPolicy) String

func (x *RedirectPolicy) String() string

func (*RedirectPolicy) WhichRedirectActionSpecifier

func (x *RedirectPolicy) WhichRedirectActionSpecifier() case_RedirectPolicy_RedirectActionSpecifier

type RedirectPolicy_RedirectAction

type RedirectPolicy_RedirectAction struct {
	// Specify elements of the redirect url individually.
	// Note: Do not specify the “response_code“ field in “redirect_action“, use
	// “status_code“ instead.
	// The following fields in “redirect_action“ are currently not supported,
	// and specifying them will cause the config to be rejected:
	// - “prefix_rewrite“
	// - “regex_rewrite“
	RedirectAction *v31.RedirectAction `protobuf:"bytes,2,opt,name=redirect_action,json=redirectAction,proto3,oneof"`
}

type RedirectPolicy_Uri

type RedirectPolicy_Uri struct {
	// The Http URI to redirect the original request to, to get the custom
	// response.
	// It should be a full FQDN with protocol, host and path.
	//
	// Example:
	//
	// .. code-block:: yaml
	//
	//	uri: https://www.mydomain.com/path/to/404.txt
	Uri string `protobuf:"bytes,1,opt,name=uri,proto3,oneof"`
}

type RedirectPolicy_builder

type RedirectPolicy_builder struct {

	// Fields of oneof RedirectActionSpecifier:
	// The Http URI to redirect the original request to, to get the custom
	// response.
	// It should be a full FQDN with protocol, host and path.
	//
	// Example:
	//
	// .. code-block:: yaml
	//
	//	uri: https://www.mydomain.com/path/to/404.txt
	Uri *string
	// Specify elements of the redirect url individually.
	// Note: Do not specify the “response_code“ field in “redirect_action“, use
	// “status_code“ instead.
	// The following fields in “redirect_action“ are currently not supported,
	// and specifying them will cause the config to be rejected:
	// - “prefix_rewrite“
	// - “regex_rewrite“
	RedirectAction *v31.RedirectAction
	// -- end of RedirectActionSpecifier
	// The new response status code if specified. This is used to override the
	// status code of the response from the new upstream if it is not an error status.
	StatusCode *wrapperspb.UInt32Value
	// HTTP headers to add to the response. This allows the
	// response policy to append, to add or to override headers of
	// the original response for local body, or the custom response from the
	// remote body, before it is sent to a downstream client.
	// Note that these are not applied if the redirected response is an error
	// response.
	ResponseHeadersToAdd []*v3.HeaderValueOption
	// HTTP headers to add to the request before it is internally redirected.
	RequestHeadersToAdd []*v3.HeaderValueOption
	// Custom action to modify request headers before selection of the
	// redirected route.
	// [#comment: TODO(pradeepcrao) add an extension category.]
	ModifyRequestHeadersAction *v3.TypedExtensionConfig
	// contains filtered or unexported fields
}

func (RedirectPolicy_builder) Build

Source Files

  • redirect_policy.pb.go

Jump to

Keyboard shortcuts

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