[Fixed] How to avoid spamming a NodeJS function?


So basicly I have a contact form in my Express application what sends me an email with SMTP. I want to do some checks in the server-side to avoid spamming. What do you advise?

Earlier today somebody just used ~100times in just minutes, probably my mail server banned it after that’s why he stopped.


https://www.npmjs.com/package/express-rate-limit works well. I could set a limit for the contact form’s request also another lighter limit for the whole website.

Thanks Mathieu Lescaudron in the comments for mentioning rate limitations.

Leave a Reply

(*) Required, Your email will not be published