API based on user IP address

后端 未结 4 869
心在旅途
心在旅途 2020-12-12 07:32

I developed an API to get all the data.

The site do not have a user registration system or anything to identify the user making a call to the API. If I could identi

4条回答
  •  死守一世寂寞
    2020-12-12 07:50

    It's not a good idea to ban an IP address for many reasons. And anyways, a hacker can spoof IP addresses, so this technique is useless.

    What you can do is throttle the API calls based on the IP. i.e. limit the numbers of calls per IP per second.

    You might find this helpful: http://blog.programmableweb.com/2007/04/02/12-ways-to-limit-an-api/

提交回复
热议问题