mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-25 19:54:07 +03:00
fix(core): allow any headers on custom protocol IPC (#9561)
This commit is contained in:
parent
68c39b8c0c
commit
98101cb17f
5
.changes/ipc-allow-headers.md
Normal file
5
.changes/ipc-allow-headers.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"tauri": patch:bug
|
||||||
|
---
|
||||||
|
|
||||||
|
Allow any headers on the IPC custom protocol.
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user