Skip to content
Open
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
2 changes: 1 addition & 1 deletion worker-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ serde_json = "1.0.143"
strsim = "0.11.1"
tar = "0.4"
toml = "0.9.5"
ureq = { version = "3.1", features = ["gzip", "json"] }
ureq = { version = "3.1", features = ["gzip", "json", "native-tls"] }
which = "8.0.0"
worker-codegen.workspace = true

Expand Down
12 changes: 11 additions & 1 deletion worker-build/src/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,17 @@ fn fix_permissions(options: &mut OpenOptions) -> &mut OpenOptions {

/// Download this binary instance into its cache path
fn download(url: &str, bin_dir: &Path) -> Result<()> {
let mut res = ureq::get(url)
let agent = ureq::Agent::config_builder()
.tls_config(
ureq::tls::TlsConfig::builder()
.provider(ureq::tls::TlsProvider::NativeTls)
.root_certs(ureq::tls::RootCerts::PlatformVerifier)
.build(),
)
.build()
.new_agent();
let mut res = agent
.get(url)
.call()
.with_context(|| format!("Failed to fetch URL {url}"))?;
let body = res.body_mut().as_reader();
Expand Down