Documentation
¶
Overview ¶
Package cors provides contrib CORS middleware configuration.
Use explicit allowed origins, methods, and headers for browser-facing APIs. Avoid wildcard origins in production unless the route is intentionally public and credential-free.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultOptions ¶
func DefaultOptions() ports.CORSOptions
DefaultOptions returns sensible default CORS options.
func New ¶
func New() ports.CORSHandler
New creates a new CORS handler that implements ports.CORSHandler.
Types ¶
Click to show internal directories.
Click to hide internal directories.