The docs aren't entirely clear but suggest that the default allowed
origins is All. But dbg! output seems to contradict this. And we
should support more headers, and say that we don't vary our CORS at
all.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
*/
fn updates_cors() -> Cors {
-
Cors::default()
- .allowed_methods([Method::GET])
+ .allow_any_origin()
+ .allowed_methods([Method::GET, Method::OPTIONS, Method::HEAD])
+ .disable_vary_header()
}
#[derive(Debug, Deserialize)]