|
In my personal view, this seems a little overbearing. If you expose an API, and you want to tell a user that they are "unauthorized" to use it, it should return a 401 status code so that the caller knows they're unauthorized. If you can't do that because their traffic looks like normal usage of the API by your web app, then I question why their usage is problematic for you. At the end of the day, you don't get to control what 'browser' the user uses to interact with your service. Sure, it might be Chrome, but it just as easily might be Firefox, or Lynx, or something the user built from scratch, or someone manually typing out HTTP requests in netcat, or, in this case, someone building a custom client for your specific service. If you host a web server, it's on you to remember that and design accordingly, not on the user to limit how they use your service. |
Just because you're right doesn't mean you aren't wrong.