Apollo federation PUSH 命令跳过 SSLValidation

Apollo federation PUSH command to skip SSLValidation

我正在尝试使用 HTTPS serviceURL 和端点将 GraphQL 架构推送到 Apollo 联合。但是我收到以下错误。如何通过跳过 Node.js 中的 SSL 验证来实现此目的?

reason: write EPROTO 4454038976:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/r …
FetchError: request to https://localhost:8080/graphql failed, reason: write EPROTO 4454038976:error:1408F10B:SSL routines:ssl3_get_record:wrong version
number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
Code: EPROTO

提前致谢。

我通过执行以下步骤解决了这个问题:

  1. 在联邦服务的.env文件中添加NODE_TLS_REJECT_UNAUTHORIZED=0
  2. 运行命令导出NODE_TLS_REJECT_UNAUTHORIZED=0
  3. 运行 Apollo Push 联邦服务命令文件