We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
egg 后台调用 https 报错 ,代码中加入这段代码可以解决
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
middleware[response] catch error Error: self signed certificate at TLSSocket.onConnectSecure (_tls_wrap.js:1473:34) at TLSSocket.emit (events.js:321:20) at TLSSocket._finishInit (_tls_wrap.js:916:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:686:12) { code: 'DEPTH_ZERO_SELF_SIGNED_CERT', name: 'ResponseError', data: undefined, path: '/clientApi/user/info', status: -1, headers: {}, res: { status: -1, statusCode: -1, statusMessage: null, headers: {}, size: 0, aborted: false, rt: 174, keepAliveSocket: false, data: undefined, requestUrls: [ 'https://135.175.161.188/clientApi/user/info' ], timing: null, remoteAddress: '135.175.161.188', remotePort: 443, socketHandledRequests: 1, socketHandledResponses: 0 } } 2020-03-04 20:43:39,430 ERROR 19452 [-/127.0.0.1/-/225ms GET /api/cvts] nodejs.ResponseError: self signed certificate, POST https://135.175.161.188/clientApi/user/info -1 (connected: true, keepalive socket: false, agent status: {"createSocketCount":1,"createSocketErrorCount":0,"closeSocketCount":0,"errorSocketCount":1,"timeoutSocketCount":0,"requestCount":0,"freeSockets":{},"sockets":{"135.175.161.188:443::::::::::::::::::":1},"requests":{}}, socketHandledRequests: 1, socketHandledResponses: 0) headers: {} at TLSSocket.onConnectSecure (_tls_wrap.js:1473:34) at TLSSocket.emit (events.js:321:20) at TLSSocket._finishInit (_tls_wrap.js:916:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:686:12) code: "DEPTH_ZERO_SELF_SIGNED_CERT" name: "ResponseError" data: undefined path: "/clientApi/user/info" status: -1 headers: {} res: {"status":-1,"statusCode":-1,"statusMessage":null,"headers":{},"size":0,"aborted":false,"rt":174,"keepAliveSocket":false,"requestUrls":["https://135.175.161.188/clientApi/user/info"],"timing":null,"remoteAddress":"134.175.161.188","remotePort":443,"socketHandledRequests":1,"socketHandledResponses":0} pid: 19452 hostname: LAPTOP-64O3I7FE
The text was updated successfully, but these errors were encountered:
No branches or pull requests
egg 后台调用 https 报错 ,代码中加入这段代码可以解决
The text was updated successfully, but these errors were encountered: