cors

package
v1.5.0-beta28 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*CorsPolicy) Descriptor

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

func (*CorsPolicy) Equal

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

func (*CorsPolicy) GetAllowCredentials

func (m *CorsPolicy) GetAllowCredentials() bool

func (*CorsPolicy) GetAllowHeaders

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

func (*CorsPolicy) GetAllowMethods

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

func (*CorsPolicy) GetAllowOrigin

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

func (*CorsPolicy) GetAllowOriginRegex

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

func (*CorsPolicy) GetDisableForRoute

func (m *CorsPolicy) GetDisableForRoute() bool

func (*CorsPolicy) GetExposeHeaders

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

func (*CorsPolicy) GetMaxAge

func (m *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) Reset

func (m *CorsPolicy) Reset()

func (*CorsPolicy) String

func (m *CorsPolicy) String() string

func (*CorsPolicy) XXX_DiscardUnknown

func (m *CorsPolicy) XXX_DiscardUnknown()

func (*CorsPolicy) XXX_Marshal

func (m *CorsPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CorsPolicy) XXX_Merge

func (m *CorsPolicy) XXX_Merge(src proto.Message)

func (*CorsPolicy) XXX_Size

func (m *CorsPolicy) XXX_Size() int

func (*CorsPolicy) XXX_Unmarshal

func (m *CorsPolicy) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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