Documentation ¶
Index ¶
- Variables
- type Cors
- type CorsMultiError
- type CorsPolicy
- func (*CorsPolicy) Descriptor() ([]byte, []int)deprecated
- func (x *CorsPolicy) GetAllowCredentials() *wrappers.BoolValue
- func (x *CorsPolicy) GetAllowHeaders() string
- func (x *CorsPolicy) GetAllowMethods() string
- func (x *CorsPolicy) GetAllowOriginStringMatch() []*v3.StringMatcher
- func (x *CorsPolicy) GetAllowPrivateNetworkAccess() *wrappers.BoolValue
- func (x *CorsPolicy) GetExposeHeaders() string
- func (x *CorsPolicy) GetFilterEnabled() *v31.RuntimeFractionalPercent
- func (x *CorsPolicy) GetMaxAge() string
- func (x *CorsPolicy) GetShadowEnabled() *v31.RuntimeFractionalPercent
- func (*CorsPolicy) ProtoMessage()
- func (x *CorsPolicy) ProtoReflect() protoreflect.Message
- func (x *CorsPolicy) Reset()
- func (x *CorsPolicy) String() string
- func (m *CorsPolicy) Validate() error
- func (m *CorsPolicy) ValidateAll() error
- type CorsPolicyMultiError
- type CorsPolicyValidationError
- type CorsValidationError
Constants ¶
This section is empty.
Variables ¶
var File_envoy_extensions_filters_http_cors_v3_cors_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Cors ¶
type Cors struct {
// contains filtered or unexported fields
}
Cors filter config.
func (*Cors) Descriptor
deprecated
func (*Cors) ProtoMessage ¶
func (*Cors) ProtoMessage()
func (*Cors) ProtoReflect ¶
func (x *Cors) ProtoReflect() protoreflect.Message
func (*Cors) Validate ¶
Validate checks the field values on Cors 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 (*Cors) ValidateAll ¶
ValidateAll checks the field values on Cors 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 CorsMultiError, or nil if none found.
type CorsMultiError ¶
type CorsMultiError []error
CorsMultiError is an error wrapping multiple validation errors returned by Cors.ValidateAll() if the designated constraints aren't met.
func (CorsMultiError) AllErrors ¶
func (m CorsMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CorsMultiError) Error ¶
func (m CorsMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CorsPolicy ¶ added in v3.4.0
type CorsPolicy struct { // Specifies string patterns that match allowed origins. An origin is allowed if any of the // string matchers match. AllowOriginStringMatch []*v3.StringMatcher `` /* 131-byte string literal not displayed */ // Specifies the content for the “access-control-allow-methods“ header. AllowMethods string `protobuf:"bytes,2,opt,name=allow_methods,json=allowMethods,proto3" json:"allow_methods,omitempty"` // Specifies the content for the “access-control-allow-headers“ header. AllowHeaders string `protobuf:"bytes,3,opt,name=allow_headers,json=allowHeaders,proto3" json:"allow_headers,omitempty"` // Specifies the content for the “access-control-expose-headers“ header. ExposeHeaders string `protobuf:"bytes,4,opt,name=expose_headers,json=exposeHeaders,proto3" json:"expose_headers,omitempty"` // Specifies the content for the “access-control-max-age“ header. MaxAge string `protobuf:"bytes,5,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"` // Specifies whether the resource allows credentials. AllowCredentials *wrappers.BoolValue `protobuf:"bytes,6,opt,name=allow_credentials,json=allowCredentials,proto3" json:"allow_credentials,omitempty"` // Specifies the % of requests for which the CORS filter is enabled. // // If neither “filter_enabled“, nor “shadow_enabled“ are specified, the CORS // filter will be enabled for 100% of the requests. // // If :ref:`runtime_key <envoy_v3_api_field_config.core.v3.RuntimeFractionalPercent.runtime_key>` is // specified, Envoy will lookup the runtime key to get the percentage of requests to filter. FilterEnabled *v31.RuntimeFractionalPercent `protobuf:"bytes,7,opt,name=filter_enabled,json=filterEnabled,proto3" json:"filter_enabled,omitempty"` // Specifies the % of requests for which the CORS policies will be evaluated and tracked, but not // enforced. // // This field is intended to be used when “filter_enabled“ is off. That field have to explicitly disable // the filter in order for this setting to take effect. // // If :ref:`runtime_key <envoy_v3_api_field_config.core.v3.RuntimeFractionalPercent.runtime_key>` is specified, // Envoy will lookup the runtime key to get the percentage of requests for which it will evaluate // and track the request's “Origin“ to determine if it's valid but will not enforce any policies. ShadowEnabled *v31.RuntimeFractionalPercent `protobuf:"bytes,8,opt,name=shadow_enabled,json=shadowEnabled,proto3" json:"shadow_enabled,omitempty"` // Specify whether allow requests whose target server's IP address is more private than that from // which the request initiator was fetched. // // More details refer to https://developer.chrome.com/blog/private-network-access-preflight. AllowPrivateNetworkAccess *wrappers.BoolValue `` /* 140-byte string literal not displayed */ // contains filtered or unexported fields }
[#next-free-field: 10]
func (*CorsPolicy) Descriptor
deprecated
added in
v3.4.0
func (*CorsPolicy) Descriptor() ([]byte, []int)
Deprecated: Use CorsPolicy.ProtoReflect.Descriptor instead.
func (*CorsPolicy) GetAllowCredentials ¶ added in v3.4.0
func (x *CorsPolicy) GetAllowCredentials() *wrappers.BoolValue
func (*CorsPolicy) GetAllowHeaders ¶ added in v3.4.0
func (x *CorsPolicy) GetAllowHeaders() string
func (*CorsPolicy) GetAllowMethods ¶ added in v3.4.0
func (x *CorsPolicy) GetAllowMethods() string
func (*CorsPolicy) GetAllowOriginStringMatch ¶ added in v3.4.0
func (x *CorsPolicy) GetAllowOriginStringMatch() []*v3.StringMatcher
func (*CorsPolicy) GetAllowPrivateNetworkAccess ¶ added in v3.4.0
func (x *CorsPolicy) GetAllowPrivateNetworkAccess() *wrappers.BoolValue
func (*CorsPolicy) GetExposeHeaders ¶ added in v3.4.0
func (x *CorsPolicy) GetExposeHeaders() string
func (*CorsPolicy) GetFilterEnabled ¶ added in v3.4.0
func (x *CorsPolicy) GetFilterEnabled() *v31.RuntimeFractionalPercent
func (*CorsPolicy) GetMaxAge ¶ added in v3.4.0
func (x *CorsPolicy) GetMaxAge() string
func (*CorsPolicy) GetShadowEnabled ¶ added in v3.4.0
func (x *CorsPolicy) GetShadowEnabled() *v31.RuntimeFractionalPercent
func (*CorsPolicy) ProtoMessage ¶ added in v3.4.0
func (*CorsPolicy) ProtoMessage()
func (*CorsPolicy) ProtoReflect ¶ added in v3.4.0
func (x *CorsPolicy) ProtoReflect() protoreflect.Message
func (*CorsPolicy) Reset ¶ added in v3.4.0
func (x *CorsPolicy) Reset()
func (*CorsPolicy) String ¶ added in v3.4.0
func (x *CorsPolicy) String() string
func (*CorsPolicy) Validate ¶ added in v3.4.0
func (m *CorsPolicy) Validate() error
Validate checks the field values on CorsPolicy 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 (*CorsPolicy) ValidateAll ¶ added in v3.4.0
func (m *CorsPolicy) ValidateAll() error
ValidateAll checks the field values on CorsPolicy 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 CorsPolicyMultiError, or nil if none found.
type CorsPolicyMultiError ¶ added in v3.4.0
type CorsPolicyMultiError []error
CorsPolicyMultiError is an error wrapping multiple validation errors returned by CorsPolicy.ValidateAll() if the designated constraints aren't met.
func (CorsPolicyMultiError) AllErrors ¶ added in v3.4.0
func (m CorsPolicyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CorsPolicyMultiError) Error ¶ added in v3.4.0
func (m CorsPolicyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CorsPolicyValidationError ¶ added in v3.4.0
type CorsPolicyValidationError struct {
// contains filtered or unexported fields
}
CorsPolicyValidationError is the validation error returned by CorsPolicy.Validate if the designated constraints aren't met.
func (CorsPolicyValidationError) Cause ¶ added in v3.4.0
func (e CorsPolicyValidationError) Cause() error
Cause function returns cause value.
func (CorsPolicyValidationError) Error ¶ added in v3.4.0
func (e CorsPolicyValidationError) Error() string
Error satisfies the builtin error interface
func (CorsPolicyValidationError) ErrorName ¶ added in v3.4.0
func (e CorsPolicyValidationError) ErrorName() string
ErrorName returns error name.
func (CorsPolicyValidationError) Field ¶ added in v3.4.0
func (e CorsPolicyValidationError) Field() string
Field function returns field value.
func (CorsPolicyValidationError) Key ¶ added in v3.4.0
func (e CorsPolicyValidationError) Key() bool
Key function returns key value.
func (CorsPolicyValidationError) Reason ¶ added in v3.4.0
func (e CorsPolicyValidationError) Reason() string
Reason function returns reason value.
type CorsValidationError ¶
type CorsValidationError struct {
// contains filtered or unexported fields
}
CorsValidationError is the validation error returned by Cors.Validate if the designated constraints aren't met.
func (CorsValidationError) Cause ¶
func (e CorsValidationError) Cause() error
Cause function returns cause value.
func (CorsValidationError) Error ¶
func (e CorsValidationError) Error() string
Error satisfies the builtin error interface
func (CorsValidationError) ErrorName ¶
func (e CorsValidationError) ErrorName() string
ErrorName returns error name.
func (CorsValidationError) Field ¶
func (e CorsValidationError) Field() string
Field function returns field value.
func (CorsValidationError) Key ¶
func (e CorsValidationError) Key() bool
Key function returns key value.
func (CorsValidationError) Reason ¶
func (e CorsValidationError) Reason() string
Reason function returns reason value.