4

I have a service in node which makes a POST request to a RESTful API end point to save some data. I'm using the request npm module to make POST request and i have URL, METHOD, HEADERS, request body (json in this case). When i start the node server i get this error { [Error: unable to verify the first certificate] code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' }, Tried googling around the issue and could not find any workable solution so far. I'm running everything behind a proxy.

Is it something related to SSL if so what would be the optimal solution for this one? My node version is v5.6.0.

Sai
  • 1,790
  • 5
  • 29
  • 51
  • 1
    Possible duplicate of [Unable to verify leaf signature](http://stackoverflow.com/questions/20082893/unable-to-verify-leaf-signature) – stdob-- Mar 16 '16 at 02:33
  • Got a chance to view that as well before posting the query, but that's more of a workaround and may escalate security concerns. Is there a proper solution for this error without any workarounds. – Sai Mar 16 '16 at 02:36
  • Any resolution for this issue? If so please share – Sai Mar 17 '16 at 17:18
  • Tried using this require('ssl-root-cas/latest').inject(); but still facing the same error. @CoolAJ86 any thoughts? – Sai Apr 20 '16 at 14:30

0 Answers0