irufus / gdax-java

Java based wrapper for Coinbase Pro (Formerly known as GDAX API and Coinbase Exchange API)
MIT License
177 stars 131 forks source link

Cloudflare Blocking access: "User-Agent" needs to be added to the header #55

Closed alistairrutherford closed 4 years ago

alistairrutherford commented 5 years ago

Unable to reach the sandbox API I noted that the exception was stating Cloudflare was blocking me due to unknown user-agent. The solution to this is to add a User-Agent string to the header.

headers.add("User-Agent", "MyAgent");

Most of the unit tests are working again with this change.

irufus commented 5 years ago

Did you create a PR for it?

onyxcoyote commented 5 years ago

submitted pull request with fix