Skip to main content

cors_layer

Function cors_layer 

Source
pub fn cors_layer(
    origins: Vec<HeaderValue>,
    methods: Vec<Method>,
    headers: Vec<HeaderName>,
) -> CorsLayer
Expand description

Build a CorsLayer that allows exactly the given origins, methods, and request headers. Callers own picking a sane (non-empty, non-wildcard when credentials matter) set of origins.