From 98101cb17fe49f305a75fcb4267f82d89f7ac0c3 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Wed, 24 Apr 2024 20:00:03 -0300 Subject: [PATCH] fix(core): allow any headers on custom protocol IPC (#9561) --- .changes/ipc-allow-headers.md | 5 +++++ core/tauri/src/ipc/protocol.rs | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 .changes/ipc-allow-headers.md diff --git a/.changes/ipc-allow-headers.md b/.changes/ipc-allow-headers.md new file mode 100644 index 000000000..4501500cf --- /dev/null +++ b/.changes/ipc-allow-headers.md @@ -0,0 +1,5 @@ +--- +"tauri": patch:bug +--- + +Allow any headers on the IPC custom protocol. diff --git a/core/tauri/src/ipc/protocol.rs b/core/tauri/src/ipc/protocol.rs index 152c0b64e..fe5031acb 100644 --- a/core/tauri/src/ipc/protocol.rs +++ b/core/tauri/src/ipc/protocol.rs @@ -137,10 +137,8 @@ pub fn get(manager: Arc>, label: String) -> UriSchemeP Method::OPTIONS => { let mut r = http::Response::new(Vec::new().into()); - r.headers_mut().insert( - ACCESS_CONTROL_ALLOW_HEADERS, - HeaderValue::from_static("Content-Type, Tauri-Callback, Tauri-Error, Tauri-Channel-Id"), - ); + r.headers_mut() + .insert(ACCESS_CONTROL_ALLOW_HEADERS, HeaderValue::from_static("*")); respond(r); }