node-XMLHttpRequest icon indicating copy to clipboard operation
node-XMLHttpRequest copied to clipboard

HTTPS requests fail for self-signed server certificates

Open accelerated opened this issue 11 years ago • 8 comments

Because of this issue in Node which changed rejectUnauthorized from default false to true (see joyent/node#3949), the TLS negotiation fails for self-signed certificates. This is very important when testing and before any CA signed certificates are installed in production. Currently there is no way to pass HTTP/HTTPS options into this module. Please consider enhancing the agent issue (see https://github.com/driverdan/node-XMLHttpRequest/issues/44) with a more generic option object (similar to the one used by HTTP/HTTPS requests) which also contains a custom Agent. This way users can set the "rejectUnauthorized" to false.

See examples for options format in http://nodejs.org/api/https.html.

I would however suggest passing the options in the Request function rather than constructor to be more in line with HTTP/HTTPS paradigm.

accelerated avatar Apr 30 '13 03:04 accelerated

+1. Using this for testing a web app.

erinishimoticha avatar Oct 11 '13 15:10 erinishimoticha

+1

nkzawa avatar Feb 02 '14 18:02 nkzawa

+1

ibc avatar Dec 22 '14 19:12 ibc

This would be great to have. +1

jakedsouza avatar Jun 24 '15 03:06 jakedsouza

+100

XmlmXmlmX avatar Apr 06 '16 06:04 XmlmXmlmX

+1

germanviscuso avatar Nov 21 '16 14:11 germanviscuso

+1

dupiesdupreez avatar Oct 19 '18 11:10 dupiesdupreez

This ticket has been open for six years. This problem is blocking my tests. Is there a workaround?

mleonhard avatar Feb 02 '19 04:02 mleonhard