For the past days i have this recurring issues where a person makes my server spams requests to a captcha service.
In short, every connection, a socket has an Captcha token to verify if they're a legitimate and not a robot.
let captchaResponse = await fetch(`https://hcaptcha.com/siteverify?response=${req.Captcha}&secret=xxx`);
captchaResponse = await captchaResponse.json();
if (!captchaResponse.success) {
this.banIP(ws.remoteAddress);
ws.close();
return;
};
Main issue is that alot of proxies keeps on spamming requests, which lags out the server.
I tried limiting the requests, making the server do only 5 requests every second instead of a request every socket connection.
Is there any sort of solution that would work?
i've known for a fact that by example, Minecraft servers make requests to verify if a player has purchased the game, yet there never has been any issues about people spamming to make the servers take alot of requests..