получаю ответ
{ FetchError: request to https://address/to/api failed, reason: Hostname/IP does not match certificate's altnames: IP: xx.xx.xx.xx is not in the cert's list:
at ClientRequest.<anonymous> (/node_modules/node-fetch/lib/index.js:1444:11)
at ClientRequest.emit (events.js:182:13)
at TLSSocket.socketErrorListener (_http_client.js:391:9)
at TLSSocket.emit (events.js:182:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at args.(anonymous function) (/usr/local/lib/node_modules/pm2/node_modules/event-loop-inspector/index.js:138:29)
at process._tickCallback (internal/process/next_tick.js:63:19)
message:
'request to https://address/to/api failed, reason: Hostname/IP does not match certificate\'s altnames: IP: xx.xx.xx.xx is not in the cert\'s list: ',
type: 'system',
errno: 'ERR_TLS_CERT_ALTNAME_INVALID',
code: 'ERR_TLS_CERT_ALTNAME_INVALID' }
at get$3 (/__sapper__/build/server/server.js:611:13)
at process._tickCallback (internal/process/next_tick.js:68:7)
Но когда делаю этот же запрос с помощью CURL все ок
curl -k -i -H 'Accept:application/json' --user login:password https://address/to/api
ну смотри
с сертификатом что-то
ну с curl ты ж с -k заигнорил ошибки ssl'a, конечно будет ок )
Обсуждают сегодня