Prevent function trigger for spam requests

Hi there,

I have a site built with Next.js. There are 3 system-generated functions to handle requests as described here.

But I’m seeing a lot of spam requests sent to invalid endpoints that are wasting the bandwidth. For example, the valid requests for my site are to endpoints like -

mysite.com/api/*
mysite.com/blog/*

But I’m getting a lot of requests sent to endpoints like -

mysite.com/wp-content/*
mysite.com/wp-includes/*

Also, it’s a marketing site, so most content doesn’t require a user login.
Is there a way to prevent these spam requests?

Thanks

Hi @GreyArk :wave:t6: welcome to the forums! Thanks for reaching out.

Have you tried using middleware or third-party library to set limits on t he number of requests allowed from a single IP that should help. Also are you using CAPTCHA or something similar this should help?