NSFW/IP blocking support in Spaces

Greetings HF Team,

I have a Space which calls an external API here

Users uploading nudity and children photos are a serious plague and take up a significant portion of the traffic to my app. I have an internal NSFW filtering mechanism but I prefer to blacklist repeat offenders via IP.

I’ve tried implementing some kind of IP tracking with the gr.Request here
It works well for a short period but I noticed that the IPs are not true IPs but rather something that is assigned in a range by the HuggingFace VM. After a few hours, because there are so many NSFW users, the blacklisted IP gets assigned to a regular new user and they can’t use the app.

Please suggest how I can solve this problem. I imagine preventing illegal activity on your platform is something you are also interested in.

Best,
Dan

@Vercixx any suggestions? Some of these people should be reported to the relevant authorities (e.g. trying to create child p… )