mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-10-12 22:47:08 +02:00
feat(updater)!: add option to use insecure transport protocol (#1814)
This commit is contained in:
1 parent
e564e2aa91
commit
04a0aea0ab
5 files changed
+71
-31
No files matched your search
@@ -148,9 +148,14 @@ impl UpdaterBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn endpoints(mut self, endpoints: Vec<Url>) -> Self {
|
||||
pub fn endpoints(mut self, endpoints: Vec<Url>) -> Result<Self> {
|
||||
crate::config::validate_endpoints(
|
||||
&endpoints,
|
||||
self.config.dangerous_insecure_transport_protocol,
|
||||
)?;
|
||||
|
||||
self.endpoints.replace(endpoints);
|
||||
self
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
pub fn executable_path<P: AsRef<Path>>(mut self, p: P) -> Self {
|
||||
@@ -219,7 +224,7 @@ impl UpdaterBuilder {
|
||||
pub fn build(self) -> Result<Updater> {
|
||||
let endpoints = self
|
||||
.endpoints
|
||||
.unwrap_or_else(|| self.config.endpoints.iter().map(|e| e.0.clone()).collect());
|
||||
.unwrap_or_else(|| self.config.endpoints.clone());
|
||||
|
||||
if endpoints.is_empty() {
|
||||
return Err(Error::EmptyEndpoints);
|
||||
|
||||
Reference in new issue
Block a user