Struct iron_cors::CorsMiddleware
[−]
[src]
pub struct CorsMiddleware { /* fields omitted */ }
The struct that holds the CORS configuration.
Methods
impl CorsMiddleware
[src]
fn with_whitelist(allowed_hosts: HashSet<String>) -> Self
[src]
Specify which origin hosts are allowed to access the resource.
fn with_allow_any() -> Self
[src]
Allow all origins to access the resource. The
Access-Control-Allow-Origin
header of the response will be set to
*
.