[![Github Actions Status](https://github.com/routerify/routerify-cors/workflows/Test/badge.svg)](https://github.com/routerify/routerify-cors/actions) [![crates.io](https://img.shields.io/crates/v/routerify-cors.svg)](https://crates.io/crates/routerify-cors) [![Documentation](https://docs.rs/routerify-cors/badge.svg)](https://docs.rs/routerify-cors) [![MIT](https://img.shields.io/crates/l/routerify-cors.svg)](./LICENSE) # routerify-cors A [`Routerify`](https://github.com/routerify/routerify) middleware which enables [`CORS`](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing). [Docs](https://docs.rs/routerify-cors) ## Install Add this to your `Cargo.toml`: ```toml [dependencies] routerify = "3" routerify-cors = "3" ``` ## Example ```rust use hyper::{Body, Request, Response, Server}; use routerify::{Router, RouterService}; // Import the CORS crate. use routerify_cors::enable_cors_all; use std::{convert::Infallible, net::SocketAddr}; // A handler for "/" page. async fn home_handler(_: Request
) -> Result