pub fn build_cors_layer(origins: &[String]) -> CorsLayerExpand description
Build a CORS layer from the configured allowed origins.
- Empty list → same-origin only (no
Access-Control-Allow-Originheader). ["*"]→ fully permissive (all origins, all methods).- Specific origins → allowlist with credentials support.