How Can I Block Requests from China to My App?

前端 未结 4 1401
时光说笑
时光说笑 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:30

    They might be using Chinese IP addresses now, but ban one country and eventually another country will be the problem. Mostly because country has nothing to do with it; the user is the problem. Instead of banning IP ranges, you should detect IP addresses that are increasing by one octet each time they outlive a free trial.

提交回复
热议问题