cors

package
v1.17.0-beta23 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_github_com_solo_io_gloo_projects_gloo_api_v1_options_cors_cors_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CorsPolicy

type CorsPolicy struct {

	// Specifies the origins that will be allowed to make CORS requests.
	//
	// An origin is allowed if either allow_origin or allow_origin_regex match.
	AllowOrigin []string `protobuf:"bytes,1,rep,name=allow_origin,json=allowOrigin,proto3" json:"allow_origin,omitempty"`
	// Specifies regex patterns that match origins that will be allowed to make
	// CORS requests.
	//
	// An origin is allowed if either allow_origin or allow_origin_regex match.
	AllowOriginRegex []string `protobuf:"bytes,2,rep,name=allow_origin_regex,json=allowOriginRegex,proto3" json:"allow_origin_regex,omitempty"`
	// Specifies the content for the *access-control-allow-methods* header.
	AllowMethods []string `protobuf:"bytes,3,rep,name=allow_methods,json=allowMethods,proto3" json:"allow_methods,omitempty"`
	// Specifies the content for the *access-control-allow-headers* header.
	AllowHeaders []string `protobuf:"bytes,4,rep,name=allow_headers,json=allowHeaders,proto3" json:"allow_headers,omitempty"`
	// Specifies the content for the *access-control-expose-headers* header.
	ExposeHeaders []string `protobuf:"bytes,5,rep,name=expose_headers,json=exposeHeaders,proto3" json:"expose_headers,omitempty"`
	// Specifies the content for the *access-control-max-age* header.
	MaxAge string `protobuf:"bytes,6,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"`
	// Specifies whether the resource allows credentials.
	AllowCredentials bool `protobuf:"varint,7,opt,name=allow_credentials,json=allowCredentials,proto3" json:"allow_credentials,omitempty"`
	// Optional, only applies to route-specific CORS Policies, defaults to false.
	// If set, the CORS Policy (specified on the virtual host) will be disabled for this route.
	DisableForRoute bool `protobuf:"varint,8,opt,name=disable_for_route,json=disableForRoute,proto3" json:"disable_for_route,omitempty"`
	// contains filtered or unexported fields
}

CorsPolicy defines Cross-Origin Resource Sharing for a virtual service.

func (*CorsPolicy) Clone added in v1.8.24

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

Clone function

func (*CorsPolicy) Descriptor deprecated

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

Deprecated: Use CorsPolicy.ProtoReflect.Descriptor instead.

func (*CorsPolicy) Equal

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

Equal function

func (*CorsPolicy) GetAllowCredentials

func (x *CorsPolicy) GetAllowCredentials() bool

func (*CorsPolicy) GetAllowHeaders

func (x *CorsPolicy) GetAllowHeaders() []string

func (*CorsPolicy) GetAllowMethods

func (x *CorsPolicy) GetAllowMethods() []string

func (*CorsPolicy) GetAllowOrigin

func (x *CorsPolicy) GetAllowOrigin() []string

func (*CorsPolicy) GetAllowOriginRegex

func (x *CorsPolicy) GetAllowOriginRegex() []string

func (*CorsPolicy) GetDisableForRoute

func (x *CorsPolicy) GetDisableForRoute() bool

func (*CorsPolicy) GetExposeHeaders

func (x *CorsPolicy) GetExposeHeaders() []string

func (*CorsPolicy) GetMaxAge

func (x *CorsPolicy) GetMaxAge() string

func (*CorsPolicy) Hash added in v1.2.13

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

Hash function

func (*CorsPolicy) ProtoMessage

func (*CorsPolicy) ProtoMessage()

func (*CorsPolicy) ProtoReflect added in v1.6.0

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

func (*CorsPolicy) Reset

func (x *CorsPolicy) Reset()

func (*CorsPolicy) String

func (x *CorsPolicy) String() string

Jump to

Keyboard shortcuts

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