gstroup / apimocker

node.js module to run a simple http server for mock service responses.
MIT License
280 stars 81 forks source link

Unable to proxy request to https enpoint with selfsigned certificate #71

Open pmajkutewicz opened 7 years ago

pmajkutewicz commented 7 years ago

Certificate is valid for *.ab*.net I'm trying to get data from path.abexample.net As the result I'm getting:

Error: self signed certificate
    at Error (native)
    at TLSSocket.<anonymous> (_tls_wrap.js:1065:38)
    at emitNone (events.js:80:13)
    at TLSSocket.emit (events.js:179:7)
    at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:593:8)
    at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:425:38)

Any chances for switch to ignore that kind of errors?

gstroup commented 7 years ago

That sounds like a reasonable idea. I'll try to look into adding that switch... but unfortunately I don't have much time lately to work on this project. Pull requests always welcome! (With tests if possible.) thanks.