cors

package
v1.7.12 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHeaders = "" /* 148-byte string literal not displayed */
)

Variables

This section is empty.

Functions

func Default

func Default() znet.HandlerFunc

func New added in v0.1.55

func New(conf *Config) znet.HandlerFunc

func NewAllowHeaders added in v1.1.17

func NewAllowHeaders() (addAllowHeader func(header string), handler znet.HandlerFunc)

Types

type Config added in v0.1.55

type Config struct {
	CustomHandler Handler

	Domains       []string
	Methods       []string
	Credentials   []string
	Headers       []string
	ExposeHeaders []string
	// contains filtered or unexported fields
}

Config cors configuration

type Handler added in v0.1.57

type Handler func(conf *Config, c *znet.Context)

Jump to

Keyboard shortcuts

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