inject_cors_headers

Function inject_cors_headers 

Source
pub fn inject_cors_headers<B>(
    response: &mut Response<B>,
    config: &CorsConfig,
    request_origin: Option<&str>,
) -> Result<()>
Expand description

Inject CORS headers into a Lambda response (generic over body type)

This function adds the appropriate CORS headers based on the configuration and the incoming request’s Origin header.