cors

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 {
	// Domains whitelist domain name
	Domains []string
	Methods []string

	Credentials []string

	Headers []string

	CustomHandler Handler
	// 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