Skip to content

Fetch 14: Read node extra ca certs, better NO_PROXY logic #6164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

RomneyDa
Copy link
Collaborator

@RomneyDa RomneyDa commented Jun 17, 2025

Reads certs from NODE_EXTRA_CA_CERTS for custom fetch.

It appears that whenever agent ca is manually set, NODE_EXTRA_CA_CERTS is not read, even though the node docs seem to imply that NODE_EXTRA_CA_CERTS are added to tls on initialization. It seems node-fetch injects these under the hood.

Adds a simple certs cache that caches

  • tls and globalAgent certs
  • certs read from NODE_EXTRA_CA_CERTS
  • caBundlePath successful cert contents

This fixes missing NODE_EXTRA_CA_CERTS and speeds up fetch.

Also adds port and case sensitivity issue fixes for NO_PROXY (taken from #6115)

@RomneyDa RomneyDa requested a review from a team as a code owner June 17, 2025 09:43
@RomneyDa RomneyDa requested review from sestinj and removed request for a team June 17, 2025 09:43
Copy link

netlify bot commented Jun 17, 2025

Deploy Preview for continuedev failed. Why did it fail? →

Name Link
🔨 Latest commit 46f9910
🔍 Latest deploy log https://app.netlify.com/projects/continuedev/deploys/6851b411b5a65e000824dddf

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jun 17, 2025
Copy link

recurseml bot commented Jun 17, 2025

😱 Found 2 issues. Time to roll up your sleeves! 😱

@RomneyDa RomneyDa mentioned this pull request Jun 17, 2025
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jun 17, 2025
@RomneyDa RomneyDa changed the title Read node extra ca certs Fetch 14: Read node extra ca certs, better NO_PROXY logic Jun 17, 2025
@RomneyDa RomneyDa closed this Jun 17, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Issues and PRs Jun 17, 2025
@RomneyDa RomneyDa reopened this Jun 17, 2025
@github-project-automation github-project-automation bot moved this from Done to In Progress in Issues and PRs Jun 17, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jun 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant