Skip to main content

render_cors_layer

Function render_cors_layer 

Source
pub fn render_cors_layer(out: &mut String, cors: &CorsConfig)
Expand description

Emit lines that wrap the axum router with a tower_http::cors::CorsLayer.

The CORS policy is derived from the fixture’s cors middleware config. After this function, router is reassigned to the layer-wrapped version.