I have server runing on heroku with heroku SSL addon. Server is created with this options:
name: 'ServerName',
version: '1.0.0',
And the I run server like this:
server.listen(process.env.PORT || 5000)
And it works fine, I can call my api for example: https://myapp.herokuapp.com/some-path. SSL cert on heroku is self-signed so there is a big warning in webbrowser but I can click continue and it works.
When I want to call my server with restify JSON client, created as follows:
var client = restify.createJsonClient({
url: 'https://myapp.herokuapp.com'
});
and then call some api like this client.get('/some-path',...)
then client returns error:
DEPTH_ZERO_SELF_SIGNED_CERT
I tried to set option rejectUnauthorized
on both server and client (as constructor option) but it didnt help...