fix(core): allow any headers on custom protocol IPC (#9561)

This commit is contained in:
Lucas Fernandes Nogueira 2024-04-24 20:00:03 -03:00 committed by GitHub
parent 68c39b8c0c
commit 98101cb17f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -0,0 +1,5 @@
---
"tauri": patch:bug
---
Allow any headers on the IPC custom protocol.

View File

@ -137,10 +137,8 @@ pub fn get<R: Runtime>(manager: Arc<AppManager<R>>, label: String) -> UriSchemeP
Method::OPTIONS => { Method::OPTIONS => {
let mut r = http::Response::new(Vec::new().into()); let mut r = http::Response::new(Vec::new().into());
r.headers_mut().insert( r.headers_mut()
ACCESS_CONTROL_ALLOW_HEADERS, .insert(ACCESS_CONTROL_ALLOW_HEADERS, HeaderValue::from_static("*"));
HeaderValue::from_static("Content-Type, Tauri-Callback, Tauri-Error, Tauri-Channel-Id"),
);
respond(r); respond(r);
} }