feat(antispam): add server-side contact form spam guard (honeypot, time-trap, rate limit, link cap)
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user