Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CorsMiddleware ¶
CorsMiddleware handles CORS and OPTIONS preflight requests with optional allowedOrigins. If allowedOrigins is nil or empty, it falls back to getAllowedOrigins(). This middleware intercepts OPTIONS requests only if the Origin header is present and valid, otherwise passing the request to the router (allowing 405/404 responses as appropriate).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.