cors

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware struct {
	Tracer middleware.Tracer
}

func New

func New(opts ...Option) *Middleware

New returns a new cors middleware which act as the default route for all OPTIONS requests and add Access-Control-Allow-Origin header to all responses.

func (*Middleware) Middleware

func (m *Middleware) Middleware() func(http.Handler) http.Handler

type Option

type Option func(*Middleware)

Jump to

Keyboard shortcuts

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