diff --git a/src/main.rs b/src/main.rs index 55fddde..611059e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -90,6 +90,9 @@ async fn main() -> Result<(), Box> { let api_server = HttpServer::new(move || { let cors = Cors::default() + .allowed_origin_fn(|origin, _req_head| { + origin.as_bytes().ends_with(b"dstn.to") + }) .allowed_origin_fn(|origin, _req_head| { origin.as_bytes().ends_with(b".dstn.to") })