I have a server running heroku SSL applications on the hero with the admin. The server is created using the following parameters:
name: 'ServerName', version: '1.0.0',
And I start the server as follows:
server.listen(process.env.PORT || 5000)
And everything works fine, I can name the api, for example: https://myapp.herokuapp.com/some-path . The heroku SSL certificate is in itself, so there is a big warning in webbrowser, but I can click continue and it works.
When I want to call my server using JSON client recovery, create it like this:
var client = restify.createJsonClient({ url: 'https://myapp.herokuapp.com' });
and then call some api, like this client.get('/some-path',...)
, then the client returns an error:
DEPTH_ZERO_SELF_SIGNED_CERT
I tried to set the rejectUnauthorized
option both on the server and on the client (as a constructor option), but it did not help ...
source share