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

Handle self-signed certs? #51

Open
SonicMagna opened this issue Jul 14, 2021 · 2 comments
Open

Handle self-signed certs? #51

SonicMagna opened this issue Jul 14, 2021 · 2 comments

Comments

@SonicMagna
Copy link

Not sure if this can be done, but I have a use case where a web page (React app, JavaScript) lists out a few hundred internal servers. The servers all have self-signed certificates. Because the browser intercepts the calls with a security warning, they all appear unreachable. If a user first goes to the site and accepts the security prompt, then afterwards this code works as expected but I'm trying to figure out how to simply indicate on the page if the server is reachable for that user, regardless of any cert issues.
Thoughts?

@sindresorhus
Copy link
Owner

I don't think that's possible. The browser-version of the reachable check is pretty simple: https://github.com/sindresorhus/is-reachable/blob/main/browser.js

It's also technically not reachable, so the detection is correct.

@SonicMagna
Copy link
Author

That's what I was thinking as well. I was just wondering if you had any ideas.
I used the browser version and it works fine, for sites without the cert issue.
Thanks much for responding quickly.

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