diff options
| author | Mason Reed <mason@vector35.com> | 2025-11-03 20:13:45 -0500 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-11-04 13:34:46 -0500 |
| commit | d926a195f4b6fa1ce8a45b9acc9232b17dfba7df (patch) | |
| tree | e5fa8680eb4a7cc4baa14fc3f5a8b9ed4ae7cae5 /plugins/warp | |
| parent | dcfe8c5416e3245c986b5dd4326e77ba53145159 (diff) | |
[WARP] Use enterprise download provider when available
This allows connections to enterprise servers without requiring the default download provider to be switched in settings
Diffstat (limited to 'plugins/warp')
| -rw-r--r-- | plugins/warp/src/container/network/client.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/warp/src/container/network/client.rs b/plugins/warp/src/container/network/client.rs index d2217bce..9f68180b 100644 --- a/plugins/warp/src/container/network/client.rs +++ b/plugins/warp/src/container/network/client.rs @@ -34,8 +34,15 @@ impl NetworkClient { if let Some(token) = &server_token { headers.push(("authorization".to_string(), format!("Bearer {}", token))); } + // NOTE: Because we pull in the system certificates as well in the enterprise download provider + // it is safe to assume that provider when available, so that we can connect to enterprise servers + // when a client is running under an enterprise client build. + let provider = DownloadProvider::get("_EnterpriseDownloadProvider").unwrap_or_else(|| { + // Not running under an enterprise client, fallback to the default download provider. + DownloadProvider::try_default().expect("No default download provider") + }); Self { - provider: DownloadProvider::try_default().unwrap(), + provider, headers, server_url, } |
