Skip to content

fix: upgrade reqwest to 0.13 with native CA cert support for non-Windows#1067

Closed
dwhoban wants to merge 7 commits intovoidzero-dev:mainfrom
dwhoban:main
Closed

fix: upgrade reqwest to 0.13 with native CA cert support for non-Windows#1067
dwhoban wants to merge 7 commits intovoidzero-dev:mainfrom
dwhoban:main

Conversation

@dwhoban
Copy link
Copy Markdown

@dwhoban dwhoban commented Mar 20, 2026

This pull request updates the reqwest dependency across the workspace, both to a newer patch version and by adjusting its features for non-Windows platforms. The changes ensure more secure and compatible TLS support by switching from the deprecated rustls-tls feature to the recommended rustls and rustls-native-certs features.

Resolves #1014.

Dependency version and feature updates:

  • Updated the reqwest crate version from 0.12 to 0.12.28 in the root Cargo.toml for improved stability and bug fixes.

TLS configuration improvements for non-Windows platforms:

  • Replaced the deprecated rustls-tls feature with rustls and added rustls-native-certs to reqwest dependencies in crates/vite_error/Cargo.toml, crates/vite_install/Cargo.toml, and crates/vite_js_runtime/Cargo.toml to ensure better certificate handling and compatibility. [1] [2] [3]

Copilot AI and others added 4 commits March 20, 2026 09:54
Co-authored-by: dwhoban <5687870+dwhoban@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Dan Hoban <5687870+dwhoban@users.noreply.github.com>
fix: upgrade reqwest to 0.13 with native CA cert support for non-Windows
Copilot AI review requested due to automatic review settings March 20, 2026 10:18
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 20, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 7f0ebe6
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69bd22648f006f00073919ab

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the workspace’s reqwest dependency pin and adjusts per-platform TLS feature flags, aiming to ensure non-Windows builds use system/native CA certificates (to work behind MITM proxies as described in #1014).

Changes:

  • Pinned workspace reqwest from "0.12" to "0.12.28" in the root Cargo.toml.
  • Updated non-Windows reqwest feature flags in several crates from rustls-tls to rustls + rustls-native-certs.
  • Kept Windows using native-tls-vendored for reqwest.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
Cargo.toml Pins reqwest to a specific 0.12.x patch release.
crates/vite_error/Cargo.toml Switches non-Windows reqwest TLS features to native cert support.
crates/vite_install/Cargo.toml Switches non-Windows reqwest TLS features to native cert support (incl. JSON).
crates/vite_js_runtime/Cargo.toml Switches non-Windows reqwest TLS features to native cert support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Cargo.toml
regex = "1.11.1"
regress = "0.11.0"
reqwest = { version = "0.12", default-features = false }
reqwest = { version = "0.12.28", default-features = false }
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title/description says reqwest is being upgraded to 0.13, but the workspace dependency is still pinned to 0.12.28. Either bump reqwest to 0.13.x (and adjust features accordingly) or update the PR title/description to match the actual version change.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

Comment thread crates/vite_install/Cargo.toml Outdated
Comment thread crates/vite_error/Cargo.toml Outdated

[target.'cfg(not(target_os = "windows"))'.dependencies]
reqwest = { workspace = true, features = ["stream", "rustls-tls"] }
reqwest = { workspace = true, features = ["stream", "rustls", "rustls-native-certs"] }
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-Windows reqwest is now configured with ["rustls", "rustls-native-certs"], but the workspace dependency remains reqwest 0.12.28. Please ensure the selected feature flags are supported by that version and that the lockfile shows native cert support is pulled in; otherwise this change may not resolve the proxy/CA issue on Linux/macOS.

Suggested change
reqwest = { workspace = true, features = ["stream", "rustls", "rustls-native-certs"] }
reqwest = { workspace = true, features = ["stream", "rustls-tls-native-roots"] }

Copilot uses AI. Check for mistakes.
dwhoban and others added 2 commits March 20, 2026 20:32
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Dan Hoban <5687870+dwhoban@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Dan Hoban <5687870+dwhoban@users.noreply.github.com>
@dwhoban dwhoban closed this Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reqwest calls in vp fail when running behind a MITM proxy.

3 participants