Skip to main content

Module cors

Module cors 

Source
Expand description

CORS (Cross-Origin Resource Sharing) middleware for HTTP handlers.

Wraps an existing Handler to add CORS headers and handle preflight OPTIONS requests.

Structs§

CorsConfig
CORS configuration.

Functions§

cors_preflight_handler
Create a standalone CORS preflight handler for OPTIONS routes.
with_cors
Wrap a handler with CORS support.