Preventing spamming

So I'm making a backend for a project, which manages the signing up and stuff.
I spammed a few requests as a test:

import threading,requests
def spam_req():
while True:'',{'test':'spam})
while True:

And this lagged down the backend a lot, I couldn't even get into the homepage.

So I tried to ban IPs that spam more than 100 requests an hour, but found out that replit doesn't allow you to see users' IPs.

Do any of you have any idea how to prevent spamming then?

You are viewing a single comment. View All

@MrVoo i'm using repldb, im asking how to prevent request spam