GeezerVison is showing github.com — fix(http): preserve TLS options for proxy tunnels by jasonsaayman · Pull Request #10957 · axios/axios
Conversation
jasonsaayman
commented
May 28, 2026
•
edited by cubic-dev-ai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
Fixes a Node HTTP adapter regression where custom httpsAgent TLS options were not applied to the tunneled HTTPS origin after CONNECT proxy setup.
Linked issue
Closes #10953
Changes
- Merge user
httpsAgent.options into the HttpsProxyAgent callback options used for the post-CONNECT TLS upgrade.
- Add an HTTP CONNECT proxy regression test with a self-signed HTTPS origin trusted via
httpsAgent.ca.
- Record the bug fix in the pre-release changelog.
Checklist
- Tests added or updated (or N/A with reason)
- Docs / types updated if public API changed (
index.d.ts and index.d.cts)
- No breaking changes (or called out explicitly above)
Summary by cubic
Fixes a Node HTTP adapter regression that dropped httpsAgent TLS options (e.g., ca, rejectUnauthorized) when connecting to an HTTPS origin through a CONNECT proxy. Restores expected TLS behavior for tunneled requests.
Description
- Summary of changes
- Merge user
httpsAgent.options into HttpsProxyAgent constructor and its callback so post-CONNECT TLS uses the same options.
- Add an integration test for CONNECT → HTTPS with a self-signed origin trusted via
httpsAgent.ca.
- Add a pre-release changelog entry.
- Reasoning
- Without forwarding these options, tunneled HTTPS requests could not trust custom CAs or honor
rejectUnauthorized, causing failures.
- Additional context
Docs
- Propose a brief note in
/docs/ explaining that httpsAgent TLS options are honored for HTTPS origins behind HTTP CONNECT proxies, with an example showing proxy + httpsAgent (custom ca, rejectUnauthorized).
Testing
- Added an integration test that sets up:
- An HTTP proxy handling CONNECT.
- An HTTPS origin with a self-signed cert.
- A request using
httpsAgent.ca to trust the origin and verify payload and plaintext is not leaked.
- Updated a unit test name to reflect constructor-option merging. No other test changes required.
Semantic version impact
- Patch: bug fix with no API changes.
Written for commit 1b359a8. Summary will update on new commits.
Review in cubic
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 3 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Re-trigger cubic
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 24, 2026
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.