How Can I Block Requests from China to My App?

前端 未结 4 1394
时光说笑
时光说笑 2021-02-08 11:01

I have an API that is somewhat popular (10,000+ requests/day). After 10 requests per day from an IP address I return a message telling the user they need to cough of some cash i

4条回答
  •  臣服心动
    2021-02-08 11:23

    Block the entire subnet of the abuser to solve the problem temporarily. These types of users will appear from other countries as well so your best bet may be to require a registration and an API key to use the API.

    If you still want to block based on IP rather than API key, check how large the abusing subnet is using whois (or BGP) and block the entire IP range.

提交回复
热议问题