Open theautonomousdev opened 1 month ago
We should not add a user agent by default, and even including one in the example is a bit iffy because people will just copy/paste the code and not change it, but maybe we could show it in the example in a non-functional way?
We should not add a user agent by default, and even including one in the example is a bit iffy because people will just copy/paste the code and not change it, but maybe we could show it in the example in a non-functional way?
I see your point, I think having it noted somewhere under the "Getting Started" section in the README or as a comment in the example code should suffice.
Even though the response error message is clear about what the issue is I had to dig into the code to identify how to override the User-Agent as it wasn't clear how or even if it was possible.
TimmyFriendTracker/1.5.1 timmy@example.com
is an example we've used before, and it is blocked, so it doesn't work by default unless you change it.
By default requests are blocked by the WAF due to User-Agent header with the response:
Overriding the baseOptions on the configuration to add a custom User-Agent resolves the issue:
Are you able to add a custom User-Agent by default or update the example code to include a custom User-Agent so it's clear that it's required?