- 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.
13 lines
414 B
Plaintext
13 lines
414 B
Plaintext
# Cloudflare Workers local development environment variables
|
|
# This file is used by wrangler for local development
|
|
|
|
# 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
|