Implementa endpoint contatti Cloudflare con supporto Resend e modalita dev/live

Configura il form per usare /api/contact di default, aggiunge API server-side con verifica Turnstile opzionale e invio Resend in live mode, e documenta variabili ambiente in README/.env.example.

Made-with: Cursor
This commit is contained in:
Javaxman
2026-04-23 21:05:31 +02:00
parent 1cd779b3c7
commit 5ab329adbf
4 changed files with 198 additions and 7 deletions

10
.env.example Normal file
View File

@ -0,0 +1,10 @@
PUBLIC_CONTACT_FORM_ACTION_URL=/api/contact
PUBLIC_CONTACT_FORM_SUCCESS_REDIRECT=http://localhost:4321/#contatti
PUBLIC_CONTACT_FORM_MAILTO=
PUBLIC_CONTACT_TURNSTILE_SITE_KEY=
CONTACT_FORM_MODE=dev
CONTACT_FORM_RESEND_API_KEY=
CONTACT_FORM_FROM_EMAIL=
CONTACT_FORM_TO_EMAIL=
CONTACT_TURNSTILE_SECRET_KEY=