cors_std

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cors

func Cors(opt cors.Config) func(next http.Handler) http.Handler

Types

type StdCORS

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

func New

func New(ctx context.Context, routeCodeCtxField string) *StdCORS

func (*StdCORS) GetConfig

func (s *StdCORS) GetConfig(pattern string) (*cors.Config, bool)

func (*StdCORS) Middleware

func (s *StdCORS) Middleware() func(http.Handler) http.Handler

func (*StdCORS) SetConfig

func (s *StdCORS) SetConfig(pattern string, config *cors.Config)

func (*StdCORS) WrapHandler

func (s *StdCORS) WrapHandler(handler http.HandlerFunc) http.HandlerFunc

Jump to

Keyboard shortcuts

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