Fix license activation and plugin requests ignoring proxy settings

Make yaak_api_client() read proxy settings from the database and apply
them to the reqwest client. Also replace bare reqwest::Client::new()
calls in license activate/deactivate with yaak_api_client() so they
get proxy support (and consistent UA/headers/timeout).

Fixes https://yaak.app/feedback/posts/cannot-activate-license

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Gregory Schier
2026-02-12 06:57:35 -08:00
co-authored by Claude Opus 4.6
parent 1127d7e3fa
commit 83f6f9786b
4 changed files with 60 additions and 7 deletions
+2 -2
View File
@@ -118,7 +118,7 @@ pub async fn activate_license<R: Runtime>(
license_key: &str,
) -> Result<()> {
info!("Activating license {}", license_key);
let client = reqwest::Client::new();
let client = yaak_api_client(window.app_handle())?;
let payload = ActivateLicenseRequestPayload {
license_key: license_key.to_string(),
app_platform: get_os_str().to_string(),
@@ -155,7 +155,7 @@ pub async fn deactivate_license<R: Runtime>(window: &WebviewWindow<R>) -> Result
let app_handle = window.app_handle();
let activation_id = get_activation_id(app_handle).await;
let client = reqwest::Client::new();
let client = yaak_api_client(window.app_handle())?;
let path = format!("/licenses/activations/{}/deactivate", activation_id);
let payload = DeactivateLicenseRequestPayload {
app_platform: get_os_str().to_string(),