cors

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CORS added in v1.14.0

type CORS struct {
	// contains filtered or unexported fields
}

func New added in v1.14.0

func New(options *Options) *CORS

func (*CORS) Middleware added in v1.14.0

func (c *CORS) Middleware(next http.Handler) http.Handler

type Options

type Options struct {
	AllowedOrigins []string
	MaxAge         int
}

func (*Options) AddFlags

func (o *Options) AddFlags(f *pflag.FlagSet)

Jump to

Keyboard shortcuts

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