mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-10-12 22:47:08 +02:00
fix(http): fix check logic to decide whether to set Origin header (#1438)
ref: https://github.com/tauri-apps/plugins-workspace/issues/1389#issuecomment-2150470335
This commit is contained in:
1 parent
d9fa37ada5
commit
da8a7bbe3a
2 files changed
+7
-2
No files matched your search
@@ -224,8 +224,8 @@ pub async fn fetch<R: Runtime>(
|
||||
request = request.header(header::USER_AGENT, "tauri-plugin-http");
|
||||
}
|
||||
|
||||
if !(cfg!(feature = "unsafe-headers")
|
||||
&& headers.contains_key(header::ORIGIN.as_str()))
|
||||
if cfg!(feature = "unsafe-headers")
|
||||
&& !headers.contains_key(header::ORIGIN.as_str())
|
||||
{
|
||||
if let Ok(url) = webview.url() {
|
||||
request =
|
||||
|
||||
Reference in new issue
Block a user