Skip to main content

Module cors

Module cors 

Source
Expand description

CORS plugin (cors).

Adds Access-Control-* response headers for allowed origins and answers OPTIONS preflight requests with a prepared 204, exiting through the dedicated preflight port so the engine routes the response straight to the client instead of continuing to upstream. Never errors: disallowed origins simply pass through on success without CORS headers.

Structs§

CorsPlugin
Applies CORS response headers based on the request’s Origin header.