cors

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Origin                     = "origin"
	AccessControlRequestMethod = "Access-Control-Request-Method"
)

cors client request header

View Source
const (
	AccessControlAllowOrigin      = "Access-Control-Allow-Origin"
	AccessControlAllowHeaders     = "Access-Control-Allow-AccessAllowHeaders"
	AccessControlAllowMethods     = "Access-Control-Allow-AccessAllowsMethods"
	AccessControlExposeHeaders    = "Access-Control-Expose-AccessAllowHeaders"
	AccessControlMaxAge           = "Access-Control-Max-Age"
	AccessControlAllowCredentials = "Access-Control-Allow-Credentials"
)

cors server response header

Variables

This section is empty.

Functions

This section is empty.

Types

type Cors

type Cors struct {
	Enabled          bool     `mapstructure:"enable"`
	AllowOrigins     []string `mapstructure:"allowOrigins"`
	AllowMethods     []string `mapstructure:"allowMethods"`
	AllowHeaders     []string `mapstructure:"allowHeaders"`
	ExposeHeaders    []string `mapstructure:"exposedHeaders"`
	MaxAge           int64    `mapstructure:"maxAge"`
	AllowCredentials bool     `mapstructure:"allowCredentials"`
}

func (Cors) AccessAllowHeaders

func (c Cors) AccessAllowHeaders() string

func (Cors) AccessAllowMethods

func (c Cors) AccessAllowMethods() string

func (Cors) AccessCredentials

func (c Cors) AccessCredentials() string

func (Cors) AccessExposedHeaders

func (c Cors) AccessExposedHeaders() string

func (Cors) AccessMaxAge

func (c Cors) AccessMaxAge() string

Jump to

Keyboard shortcuts

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