mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-04 13:48:01 +02:00
fix(http): include browser headers if not set by user (#1354)
* fix(http): include browser automatic headers if not set by user close #1349 * fmt * Update browser-headers.md * lint * generate api
This commit is contained in:
@@ -45,7 +45,7 @@ pub struct FetchResponse {
|
||||
rid: ResourceId,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ClientConfig {
|
||||
method: String,
|
||||
@@ -57,7 +57,7 @@ pub struct ClientConfig {
|
||||
proxy: Option<Proxy>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Proxy {
|
||||
all: Option<UrlOrConfig>,
|
||||
@@ -65,7 +65,7 @@ pub struct Proxy {
|
||||
https: Option<UrlOrConfig>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[serde(untagged)]
|
||||
pub enum UrlOrConfig {
|
||||
@@ -73,7 +73,7 @@ pub enum UrlOrConfig {
|
||||
Config(ProxyConfig),
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ProxyConfig {
|
||||
url: String,
|
||||
@@ -81,7 +81,7 @@ pub struct ProxyConfig {
|
||||
no_proxy: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct BasicAuth {
|
||||
username: String,
|
||||
password: String,
|
||||
|
||||
Reference in New Issue
Block a user