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)
Click to show internal directories.
Click to hide internal directories.