R
Railway11mo ago
fvr1

IP blocking

Is there a way to automatically block IPs when the service receives X amount of requests in Y seconds from the same IP? My purpose is to have a simple/basic way to avoid people scrapping the service. Or any other way I could achive that? PS: I really love Railway, thanks to all the team ❤️
5 Replies
Percy
Percy11mo ago
Project ID: N/A
Fragly
Fragly11mo ago
You can totally just do that in your app or use something like cloudflare, which has that kind of features
fvr1
fvr1OP11mo ago
Could you tell me a little bit more on how I could do that in my app please?
Adam
Adam11mo ago
The benefits of doing it in-app is only really useful if your app does some amount of processing for each request. All you'd do is check the x-forwarded-for header for the requestor's IP and block based on that.
fvr1
fvr1OP11mo ago
Peeeerfect, thanks!!!
Want results from more Discord servers?
Add your server