Skip to content
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

Support custom agents with rejectUnauthorized: false #124

Open
1 task done
loks0n opened this issue Apr 11, 2024 · 1 comment
Open
1 task done

Support custom agents with rejectUnauthorized: false #124

loks0n opened this issue Apr 11, 2024 · 1 comment

Comments

@loks0n
Copy link

loks0n commented Apr 11, 2024

Describe the feature

We're building an SDK and we'd like to give users a method that disables SSL verification so they can get things working in their development environment.

It'd be nice to have a simpler version of the createProxy function that just creates an agent, adapting parameters between node-fetch and undici fetch

For example:

import { fetch } from 'node-fetch-native'
import { createAgent } from 'node-fetch-native/agent'

const agent = createAgent({ rejectUnauthorized: false });

fetch('https://localhost:4444/api', { ...agent })

PoC here: loks0n@1fe4152

Additional information

  • Would you be willing to help implement this feature?
@talentlessguy
Copy link

talentlessguy commented Jan 19, 2025

this feature would be very useful to migrate away from node-fetch where custom http.Agent is used. Perhaps a pull request could be opened?

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

No branches or pull requests

2 participants