Documentation ¶
Index ¶
- Variables
- type Cors
- type CorsPolicy
- func (*CorsPolicy) Descriptor() ([]byte, []int)deprecated
- func (x *CorsPolicy) GetAllowCredentials() *wrapperspb.BoolValue
- func (x *CorsPolicy) GetAllowHeaders() string
- func (x *CorsPolicy) GetAllowMethods() string
- func (x *CorsPolicy) GetAllowOriginStringMatch() []*v3.StringMatcher
- func (x *CorsPolicy) GetAllowPrivateNetworkAccess() *wrapperspb.BoolValue
- func (x *CorsPolicy) GetExposeHeaders() string
- func (x *CorsPolicy) GetFilterEnabled() *v31.RuntimeFractionalPercent
- func (x *CorsPolicy) GetForwardNotMatchingPreflights() *wrapperspb.BoolValue
- 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
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. Set this in ref:`http_filters <envoy_v3_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http_filters>` to enable the CORS filter.
Please note that the :ref:`CorsPolicy <envoy_v3_api_msg_extensions.filters.http.cors.v3.CorsPolicy>` must be configured in the “RouteConfiguration“ as “typed_per_filter_config“ at some level to make the filter work.
func (*Cors) ProtoReflect ¶
func (x *Cors) ProtoReflect() protoreflect.Message
type CorsPolicy ¶
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 *wrapperspb.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 *wrapperspb.BoolValue `` /* 140-byte string literal not displayed */ // Specifies if preflight requests not matching the configured allowed origin should be forwarded // to the upstream. Default is true. ForwardNotMatchingPreflights *wrapperspb.BoolValue `` /* 150-byte string literal not displayed */ // contains filtered or unexported fields }
Per route configuration for the CORS filter. This configuration should be configured in the “RouteConfiguration“ as “typed_per_filter_config“ at some level to make the filter work. [#next-free-field: 11]
func (*CorsPolicy) Descriptor
deprecated
func (*CorsPolicy) Descriptor() ([]byte, []int)
Deprecated: Use CorsPolicy.ProtoReflect.Descriptor instead.
func (*CorsPolicy) GetAllowCredentials ¶
func (x *CorsPolicy) GetAllowCredentials() *wrapperspb.BoolValue
func (*CorsPolicy) GetAllowHeaders ¶
func (x *CorsPolicy) GetAllowHeaders() string
func (*CorsPolicy) GetAllowMethods ¶
func (x *CorsPolicy) GetAllowMethods() string
func (*CorsPolicy) GetAllowOriginStringMatch ¶
func (x *CorsPolicy) GetAllowOriginStringMatch() []*v3.StringMatcher
func (*CorsPolicy) GetAllowPrivateNetworkAccess ¶
func (x *CorsPolicy) GetAllowPrivateNetworkAccess() *wrapperspb.BoolValue
func (*CorsPolicy) GetExposeHeaders ¶
func (x *CorsPolicy) GetExposeHeaders() string
func (*CorsPolicy) GetFilterEnabled ¶
func (x *CorsPolicy) GetFilterEnabled() *v31.RuntimeFractionalPercent
func (*CorsPolicy) GetForwardNotMatchingPreflights ¶
func (x *CorsPolicy) GetForwardNotMatchingPreflights() *wrapperspb.BoolValue
func (*CorsPolicy) GetMaxAge ¶
func (x *CorsPolicy) GetMaxAge() string
func (*CorsPolicy) GetShadowEnabled ¶
func (x *CorsPolicy) GetShadowEnabled() *v31.RuntimeFractionalPercent
func (*CorsPolicy) ProtoMessage ¶
func (*CorsPolicy) ProtoMessage()
func (*CorsPolicy) ProtoReflect ¶
func (x *CorsPolicy) ProtoReflect() protoreflect.Message
func (*CorsPolicy) Reset ¶
func (x *CorsPolicy) Reset()
func (*CorsPolicy) String ¶
func (x *CorsPolicy) String() string