I am working on a static site generated with hugo and want to embed an email form without using external (commercial or possibly untrustworthy) services like formspree.io (too much of a headache in european union with all the regulations).
For that purpose I built an API that I can post data to - after validating it, an email will be sent via sendmail. The API is built with flask (python).
How do I secure my endpoint against spammers, robots and other bad actors?
I did some research and read about flask-limiter but I don't think this is enough.
Others suggest including a CSRF token but I don't know how to "generate" and include it into my static site.
Another thing I thought would probably help is Google reCaptcha but I don't know how to use it in a static site.
Any ideas / suggestions on how to proceed?
Thank you in advance.