fn cors_options() -> CorsOptions {
    let (allowed_origins, failed_origins) = AllowedOrigins::some(&["https://www.acme.com"]);
    assert!(failed_origins.is_empty());

    // You can also deserialize this
    rocket_cors::CorsOptions {
        allowed_origins: allowed_origins,
        allowed_methods: vec![Method::Get].into_iter().map(From::from).collect(),
        allowed_headers: AllowedHeaders::some(&["Authorization", "Accept"]),
        allow_credentials: true,
        ..Default::default()
    }
}
/// Returns the "application wide" Cors struct
Returns the "application wide" Cors struct
Returns the " application wide " Cors struct
fn cors_options() -> CorsOptions {
    let (allowed_origins, failed_origins) = AllowedOrigins::some(&["https://www.acme.com"]);
    assert!(failed_origins.is_empty());
    // You can also deserialize this
    rocket_cors::CorsOptions {
        allowed_origins: allowed_origins,
        allowed_methods: vec![Method::Get].into_iter().map(From::from).collect(),
        allowed_headers: AllowedHeaders::some(&["Authorization", "Accept"]),
        allow_credentials: true,
        ..Default::default()
    }
}
fn cors_options ( ) -> CorsOptions { let ( allowed_origins , failed_origins ) = AllowedOrigins :: some ( & [ " " ] ) ; assert ! ( failed_origins is_empty ( ) ) ; // You can also deserialize this rocket_cors :: CorsOptions { allowed_origins : allowed_origins , allowed_methods : vec ! [ Method Get ] . into_iter ( ) . map ( From :: from ) . collect ( ) , allowed_headers : AllowedHeaders :: some ( & [ " " , " " ] ) , allow_credentials : true , .. Default :: default ( ) } }
Returns the "application wide" Cors struct
Returns the " application wide " Cors struct