Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion liana-gui/src/services/connect/client/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ impl AuthClient {
.http
.request(method, url)
.header("apikey", &self.api_public_key)
.header("Content-Type", "application/json");
.header("Content-Type", "application/json")
.header("User-Agent", format!("liana-gui/{}", crate::VERSION));
tracing::debug!("Sending http request: {:?}", req);
req
}
Expand Down Expand Up @@ -136,6 +137,7 @@ impl AuthClient {
.post(format!("{}/auth/v1/verify", self.url))
.header("apikey", &self.api_public_key)
.header("Content-Type", "application/json")
.header("User-Agent", format!("liana-gui/{}", crate::VERSION))
.json(&VerifyOtp {
email: &self.email,
token,
Expand All @@ -161,6 +163,7 @@ impl AuthClient {
))
.header("apikey", &self.api_public_key)
.header("Content-Type", "application/json")
.header("User-Agent", format!("liana-gui/{}", crate::VERSION))
.json(&RefreshToken { refresh_token })
.send()
.await?
Expand Down
3 changes: 2 additions & 1 deletion liana-gui/src/services/connect/client/backend/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ fn request<U: IntoUrl>(
.request(method, url)
.header("Authorization", format!("Bearer {}", access_token))
.header("Content-Type", "application/json")
.header("Liana-Version", "0.1");
.header("Liana-Version", format!("{}", crate::VERSION))
.header("User-Agent", format!("liana-gui/{}", crate::VERSION));
tracing::debug!("Sending http request: {:?}", req);
req
}
Expand Down
6 changes: 5 additions & 1 deletion liana-gui/src/services/connect/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ pub async fn get_service_config(
} else {
LIANALITE_SIGNET_URL
};
let res: ServiceConfigResource = reqwest::get(format!("{}/v1/desktop", backend_api_url))
let client = reqwest::Client::new();
let res: ServiceConfigResource = client
.get(format!("{}/v1/desktop", backend_api_url))
.header("User-Agent", format!("liana-gui/{}", crate::VERSION))
.send()
.await?
.json()
.await?;
Expand Down
3 changes: 2 additions & 1 deletion liana-gui/src/services/keys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ fn request<U: reqwest::IntoUrl>(
let req = http
.request(method, url)
.header("Content-Type", "application/json")
.header("API-Version", "0.1");
.header("API-Version", "0.1")
.header("User-Agent", format!("liana-gui/{}", crate::VERSION));
tracing::debug!("Sending http request: {:?}", req);
req
}
Expand Down
Loading