diff --git a/lib/actions/forms.ts b/lib/actions/forms.ts index f4f272c..e6d91c6 100644 --- a/lib/actions/forms.ts +++ b/lib/actions/forms.ts @@ -451,8 +451,8 @@ export async function submitForm(input: unknown) { // Generous per-IP+form window because legitimate public signups at a // hackerspace often share one NAT/wifi IP (a captcha is the real control, // intentionally deferred). Best-effort IP from the proxy header. - const h = await headers() - const ip = (h.get('x-forwarded-for')?.split(',')[0] ?? '').trim() || 'unknown' + const rlHdrs = await headers() + const ip = (rlHdrs.get('x-forwarded-for')?.split(',')[0] ?? '').trim() || 'unknown' const rl = checkRateLimit(`form-submit:${ip}:${form.id}`, 20, 60_000) if (!rl.allowed) { return { error: 'Too many submissions from your network. Please wait a moment and try again.' }