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

bug: eventsource fails to reject self-signed certs if non-empty options are provided #322

Open
evanshortiss opened this issue Jul 27, 2023 · 0 comments

Comments

@evanshortiss
Copy link
Contributor

I stumbled across this issue when I tried to understand why NODE_TLS_REJECT_UNAUTHORIZED didn't work with this library.

The following code will work as expected, and reject a self-signed TLS certificate.

const es = new EventSource('https://self-signed.com')

However, the following code will connect to the self-signed certificate:

const es = new EventSource('https://self-signed.com', {})

This appears to be an unexpected, and undesirable behaviour. Let me know if I've misunderstood. I'll open a PR in the meantime :)

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