feat(antispam): add server-side contact form spam guard (honeypot, time-trap, rate limit, link cap)

This commit is contained in:
2026-09-01 17:15:40 +02:00
parent db0963a7db
commit 2c51831a81
6 changed files with 165 additions and 7 deletions

View File

@@ -7,6 +7,7 @@ import { sendContactFormAction } from '@/app/actions/contact';
export function ContactForm() {
const [status, setStatus] = React.useState<'idle' | 'loading' | 'success' | 'error'>('idle');
const [formLoadedAt] = React.useState(() => Date.now());
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
@@ -132,6 +133,7 @@ export function ContactForm() {
</div>
<input type="text" name="company_website" style={{ display: 'none' }} tabIndex={-1} autoComplete="off" />
<input type="hidden" name="form_loaded_at" value={formLoadedAt} />
<Button
type="submit"