Documentation
¶
Index ¶
- Variables
- type Cors
- type CorsPolicy
- func (x *CorsPolicy) ClearAllowCredentials()
- func (x *CorsPolicy) ClearAllowPrivateNetworkAccess()
- func (x *CorsPolicy) ClearFilterEnabled()
- func (x *CorsPolicy) ClearForwardNotMatchingPreflights()
- func (x *CorsPolicy) ClearShadowEnabled()
- 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 (x *CorsPolicy) HasAllowCredentials() bool
- func (x *CorsPolicy) HasAllowPrivateNetworkAccess() bool
- func (x *CorsPolicy) HasFilterEnabled() bool
- func (x *CorsPolicy) HasForwardNotMatchingPreflights() bool
- func (x *CorsPolicy) HasShadowEnabled() bool
- func (*CorsPolicy) ProtoMessage()
- func (x *CorsPolicy) ProtoReflect() protoreflect.Message
- func (x *CorsPolicy) Reset()
- func (x *CorsPolicy) SetAllowCredentials(v *wrapperspb.BoolValue)
- func (x *CorsPolicy) SetAllowHeaders(v string)
- func (x *CorsPolicy) SetAllowMethods(v string)
- func (x *CorsPolicy) SetAllowOriginStringMatch(v []*v3.StringMatcher)
- func (x *CorsPolicy) SetAllowPrivateNetworkAccess(v *wrapperspb.BoolValue)
- func (x *CorsPolicy) SetExposeHeaders(v string)
- func (x *CorsPolicy) SetFilterEnabled(v *v31.RuntimeFractionalPercent)
- func (x *CorsPolicy) SetForwardNotMatchingPreflights(v *wrapperspb.BoolValue)
- func (x *CorsPolicy) SetMaxAge(v string)
- func (x *CorsPolicy) SetShadowEnabled(v *v31.RuntimeFractionalPercent)
- func (x *CorsPolicy) String() string
- type CorsPolicy_builder
- type Cors_builder
Constants ¶
This section is empty.
Variables ¶
View Source
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) ClearAllowCredentials ¶
func (x *CorsPolicy) ClearAllowCredentials()
func (*CorsPolicy) ClearAllowPrivateNetworkAccess ¶
func (x *CorsPolicy) ClearAllowPrivateNetworkAccess()
func (*CorsPolicy) ClearFilterEnabled ¶
func (x *CorsPolicy) ClearFilterEnabled()
func (*CorsPolicy) ClearForwardNotMatchingPreflights ¶
func (x *CorsPolicy) ClearForwardNotMatchingPreflights()
func (*CorsPolicy) ClearShadowEnabled ¶
func (x *CorsPolicy) ClearShadowEnabled()
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) HasAllowCredentials ¶
func (x *CorsPolicy) HasAllowCredentials() bool
func (*CorsPolicy) HasAllowPrivateNetworkAccess ¶
func (x *CorsPolicy) HasAllowPrivateNetworkAccess() bool
func (*CorsPolicy) HasFilterEnabled ¶
func (x *CorsPolicy) HasFilterEnabled() bool
func (*CorsPolicy) HasForwardNotMatchingPreflights ¶
func (x *CorsPolicy) HasForwardNotMatchingPreflights() bool
func (*CorsPolicy) HasShadowEnabled ¶
func (x *CorsPolicy) HasShadowEnabled() bool
func (*CorsPolicy) ProtoMessage ¶
func (*CorsPolicy) ProtoMessage()
func (*CorsPolicy) ProtoReflect ¶
func (x *CorsPolicy) ProtoReflect() protoreflect.Message
func (*CorsPolicy) Reset ¶
func (x *CorsPolicy) Reset()
func (*CorsPolicy) SetAllowCredentials ¶
func (x *CorsPolicy) SetAllowCredentials(v *wrapperspb.BoolValue)
func (*CorsPolicy) SetAllowHeaders ¶
func (x *CorsPolicy) SetAllowHeaders(v string)
func (*CorsPolicy) SetAllowMethods ¶
func (x *CorsPolicy) SetAllowMethods(v string)
func (*CorsPolicy) SetAllowOriginStringMatch ¶
func (x *CorsPolicy) SetAllowOriginStringMatch(v []*v3.StringMatcher)
func (*CorsPolicy) SetAllowPrivateNetworkAccess ¶
func (x *CorsPolicy) SetAllowPrivateNetworkAccess(v *wrapperspb.BoolValue)
func (*CorsPolicy) SetExposeHeaders ¶
func (x *CorsPolicy) SetExposeHeaders(v string)
func (*CorsPolicy) SetFilterEnabled ¶
func (x *CorsPolicy) SetFilterEnabled(v *v31.RuntimeFractionalPercent)
func (*CorsPolicy) SetForwardNotMatchingPreflights ¶
func (x *CorsPolicy) SetForwardNotMatchingPreflights(v *wrapperspb.BoolValue)
func (*CorsPolicy) SetMaxAge ¶
func (x *CorsPolicy) SetMaxAge(v string)
func (*CorsPolicy) SetShadowEnabled ¶
func (x *CorsPolicy) SetShadowEnabled(v *v31.RuntimeFractionalPercent)
func (*CorsPolicy) String ¶
func (x *CorsPolicy) String() string
type CorsPolicy_builder ¶
type CorsPolicy_builder struct {
// Specifies string patterns that match allowed origins. An origin is allowed if any of the
// string matchers match.
AllowOriginStringMatch []*v3.StringMatcher
// Specifies the content for the “access-control-allow-methods“ header.
AllowMethods string
// Specifies the content for the “access-control-allow-headers“ header.
AllowHeaders string
// Specifies the content for the “access-control-expose-headers“ header.
ExposeHeaders string
// Specifies the content for the “access-control-max-age“ header.
MaxAge string
// Specifies whether the resource allows credentials.
AllowCredentials *wrapperspb.BoolValue
// 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
// 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
// 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
// Specifies if preflight requests not matching the configured allowed origin should be forwarded
// to the upstream. Default is true.
ForwardNotMatchingPreflights *wrapperspb.BoolValue
// contains filtered or unexported fields
}
func (CorsPolicy_builder) Build ¶
func (b0 CorsPolicy_builder) Build() *CorsPolicy
type Cors_builder ¶
type Cors_builder struct {
// contains filtered or unexported fields
}
func (Cors_builder) Build ¶
func (b0 Cors_builder) Build() *Cors
Source Files
¶
- cors.pb.go
Click to show internal directories.
Click to hide internal directories.