randomRandom
randomRandom

Reputation: 23

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

I have a custom API running on http://127.0.0.1:8080 and I have my own chainlink node running on http://127.0.0.1:6688. I get the error saying "Connections to local/private and multicast networks are disabled by default for security reasons: disallowed IP" when sending requests.

I guess maybe we can enable it by modifying the env file, but I don't know which configuration should I change. Does anyone know if we can enable these local/private connections? and how to do that?

Upvotes: 2

Views: 147

Answers (1)

Patrick Collins
Patrick Collins

Reputation: 6131

Per the 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.

ie:

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

You can also use this flag in JSON

Upvotes: 2

Related Questions