cors

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GlobalOptions

func GlobalOptions(opts ...Opt) httprouter.HandlerFunc

func Middleware

func Middleware(opts ...Opt) httprouter.Middleware

func RouterOpts

func RouterOpts(opts ...Opt) []httprouter.Opt

Types

type Opt

type Opt func(c *config)

func MaxAge

func MaxAge(maxAge time.Duration) Opt

func WithAllowCredentials

func WithAllowCredentials(allowCredentials bool) Opt

func WithOrigin

func WithOrigin(origin string) Opt

func WithRequestHeaders

func WithRequestHeaders(headers []string) Opt

Jump to

Keyboard shortcuts

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