cors

package
v0.0.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Protect

func Protect(h http.Handler, opts CORSOptions) http.Handler

Types

type CORSOptions

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

func (*CORSOptions) AddAllowedHeaders

func (co *CORSOptions) AddAllowedHeaders(headers ...string)

func (*CORSOptions) AddAllowedOrigins

func (co *CORSOptions) AddAllowedOrigins(origins ...string)

func (*CORSOptions) AllowCredentials

func (co *CORSOptions) AllowCredentials(allow bool)

func (*CORSOptions) MaxAge

func (co *CORSOptions) MaxAge(max int)

Jump to

Keyboard shortcuts

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