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 · 0 comments
Open
1 task done

Support custom agents with rejectUnauthorized: false #124

loks0n opened this issue Apr 11, 2024 · 0 comments

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?
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

1 participant