From 1c4670a05c38aef01f096d44458fb88a13ffd6d1 Mon Sep 17 00:00:00 2001 From: Asmir Avdicevic Date: Thu, 18 Jan 2024 22:09:09 +0100 Subject: [PATCH] fix(gateway): extend CORS to support HEAD & OPTIONS --- iroh-gateway/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iroh-gateway/src/main.rs b/iroh-gateway/src/main.rs index db87e1ef..c5fcede2 100644 --- a/iroh-gateway/src/main.rs +++ b/iroh-gateway/src/main.rs @@ -518,7 +518,7 @@ async fn main() -> anyhow::Result<()> { let cors = CorsLayer::new() .allow_headers(AllowHeaders::mirror_request()) - .allow_methods([Method::GET]) + .allow_methods([Method::GET, Method::HEAD, Method::OPTIONS]) .allow_origin(AllowOrigin::mirror_request()); #[rustfmt::skip]