如何启用到 Chainlink 节点的本地 bridge/httpget/task api 连接?

how to enable local bridge/httpget/task api connection to chainlink node?

我在 http://127.0.0.1:8080 and I have my own chainlink node running on http://127.0.0.1:6688 上有一个自定义 API 运行。我在发送请求时收到错误提示“出于安全原因,默认情况下禁用与 local/private 和多播网络的连接:不允许的 IP”。

我想也许我们可以通过修改env文件来启用它,但我不知道应该更改哪个配置。有谁知道我们是否可以启用这些 local/private 连接?以及如何做到这一点?

根据 chainlink docs on the http task:

allowUnrestrictedNetworkAccess (optional): permits the task to access a URL at localhost, which could present a security risk. Note that Bridge tasks allow this by default.

即:

my_http_task [type="http"
              method=PUT
              url="http://chain.link"
              requestData="{\"foo\": $(foo), \"bar\": $(bar), \"jobID\": 123}"
              allowUnrestrictedNetworkAccess=true
              ]

您也可以在 JSON

中使用此标志