Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New() middleware.Configurable[Options]
New creates a new instance of the CORS middleware, implementing middleware.Configurable. If CORS.Settings isn't called, then the CORS.Handler function will hydrate the middleware's configuration with sane default(s) if applicable.
Types ¶
type CORS ¶
type CORS struct { middleware.Configurable[Options] // contains filtered or unexported fields }
CORS represents a middleware component that applies configurable Options settings to HTTP requests. It embeds middleware.Configurable for Options configuration.
func (*CORS) Handler ¶
Handler is a middleware method that wraps the provided http.Handler, applying CORS settings and injecting context with predefined values.
Click to show internal directories.
Click to hide internal directories.