cors

package
v0.0.0-...-672b8e3 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CORS

type CORS struct {
	Enabled bool

	// allow configuration
	AllowOrigins     []string
	AllowMethods     []string
	AllowHeaders     []string
	AllowCredentials bool
	ExposeHeaders    []string

	// preflight
	PreflightRequestMethod string
	PreflightMaxAgeSeconds *int
	// contains filtered or unexported fields
}

func NewCORS

func NewCORS() *CORS

func (*CORS) EncodeAllowCredentialsHeader

func (c *CORS) EncodeAllowCredentialsHeader() string

func (*CORS) EncodeAllowHeaders

func (c *CORS) EncodeAllowHeaders() string

func (*CORS) EncodeExposeHeaders

func (c *CORS) EncodeExposeHeaders() string

func (*CORS) EncodePreflightMaxAgeSeconds

func (c *CORS) EncodePreflightMaxAgeSeconds() string

func (*CORS) EncodedAllowMethods

func (c *CORS) EncodedAllowMethods() string

func (*CORS) HeadersAllowed

func (c *CORS) HeadersAllowed(headers []string) bool

func (*CORS) MethodAllowed

func (c *CORS) MethodAllowed(method string) bool

func (*CORS) OriginAllowed

func (c *CORS) OriginAllowed(origin string) bool

Jump to

Keyboard shortcuts

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