Skip to content

Support custom agents with rejectUnauthorized: false #124

Open
@loks0n

Description

@loks0n

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions