feat(contact): implement Turnstile protection via API proxy
- Add `pages/api/contact.ts` to proxy n8n webhook and verify Turnstile tokens. - Update `contact-us.astro` form to include Turnstile widget and validation logic. - Replace hardcoded sitekey with `PUBLIC_TURNSTILE_SITE_KEY` from environment variables. - Update `dev.vars` to include Cloudflare Turnstile keys.
This commit is contained in:
@@ -3,3 +3,10 @@
|
||||
|
||||
# Production Payload CMS URL (for SSR fetch)
|
||||
PAYLOAD_CMS_URL=https://enchun-admin.anlstudio.cc
|
||||
|
||||
# Cloudflare Turnstile
|
||||
CF_TURNSTILE_SITE_KEY=0x4AAAAAACkOUZK2u7Fo8IZ-
|
||||
CF_TURNSTILE_SECRET_KEY=0x4AAAAAACkOUV9TDUOwVdcdLUakEVxJjww
|
||||
|
||||
# n8n webhook
|
||||
N8N_WEBHOOK_URL=https://n8n.anlstudio.cc/webhook/contact
|
||||
|
||||
Reference in New Issue
Block a user