Merge branch 'v2' into store-rework-2

This commit is contained in:
Tony
2024-10-17 11:31:51 +08:00
committed by GitHub
4 changed files with 66 additions and 52 deletions
+8
View File
@@ -264,6 +264,14 @@ pub async fn fetch<R: Runtime>(
}
}
// In case empty origin is passed, remove it. Some services do not like Origin header
// so this way we can remove it in explicit way. The default behaviour is still to set it
if cfg!(feature = "unsafe-headers")
&& headers.get(header::ORIGIN) == Some(&HeaderValue::from_static(""))
{
headers.remove(header::ORIGIN);
};
if let Some(data) = data {
request = request.body(data);
}