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 for SSL client certificate in Nodejs undici #549

Open
snird opened this issue Dec 13, 2023 · 1 comment
Open

Support for SSL client certificate in Nodejs undici #549

snird opened this issue Dec 13, 2023 · 1 comment

Comments

@snird
Copy link

snird commented Dec 13, 2023

I know this library is intended for use in browser & nodejs, but one of the strong use cases for using it in node is the massive performance boost the underlying undici has over the http module.

So given the benefit of using a library that utilizes undici, and that ky is currently the best wrapper for a more convenient use - I ask about a specific implementation for nodejs.

Undici can utilize client certificates: https://github.com/nodejs/undici/blob/main/docs/best-practices/client-certificate.md
If I'm not mistaken, the implementation on ky side is to allow some way of passing the tls details to the connect method (which is standardized, only the tls parameters aren't)

Is it possible?

@sindresorhus
Copy link
Owner

ky depends on fetch, which is built on Unidici in Node.js. You will have to get Node.js to expose additional options on fetch for this to be possible. Ky has no access to Unidici through fetch.

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