-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
HTTP.get generates a SELF_SIGNED_CERT_IN_CHAIN error #2866
Comments
Sounds like you have a self-signed certificate in your chain? By default a good HTTPS library ought to be wary of such things and only trust certificates with a known root. If you need more subtle control over your https requests, I recommend using the |
I understand and appreciate it. Thanks for taking the time to answer. It is very common for companies and enterprises to have their certificates issued by an internal CA, since they do not plan to expose their services to the internet. Moreover, a self-signed certificate could be handy when starting up a new project. Do you think it would be a good idea to maybe have an option to explicitly accept self-signed certificates, disabled by default like it is today? |
For future reference, adding process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; at the beginning of the file proved to be an effective workaround. Not ideal, but it's working. |
Yes I've posted it just above. |
You've added that to the specific route ? |
@bluemonk - maybe this request will help convince MDG to pass-through unknown HTTP options to the underlying module. |
@bluemonk - It helps and resolve my issue as well, Thanks |
Hello,
the following code
generates the following error
is it a known issue with Self Signed certificates? Am I doing something wrong with the options?
The text was updated successfully, but these errors were encountered: