node.js - Node js SSL error {"code":"CERT_UNTRUSTED"} -


i using node version 0.12.7 npm (2.11.3) , sails (0.11.5). in project consuming rest api using request (npm module). api on domain enable cors in sails, working fine on qa server when move code production (api hosted ssl) @ api call says

{"code":"cert_untrusted"}. 

below api call request module.

request({         url: sails.config.constant.baseapiurl+'login',         method: "post",         json: true,          body: data     }, function (error, response, body){             console.log('error:- '+json.stringify(error));             console.log('response:- '+json.stringify(response));             console.log('body:- '+json.stringify(body));            // other code handle response      });   ****response:-****  error:- {"code":"cert_untrusted"} response:- undefined body:- undefined 

how solve issue.


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -