wrangler.toml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. name = "turnstile-siteverify"
  2. main = "src/index.ts"
  3. compatibility_date = "2026-05-01"
  4. compatibility_flags = ["nodejs_compat"]
  5. # Serve the post-deploy form (public/post-deploy.html) as a static asset.
  6. # After deploy, customers land on /post-deploy.html with their Worker URL
  7. # prefilled, and can create a Turnstile widget without leaving the flow.
  8. [assets]
  9. directory = "./public"
  10. binding = "ASSETS"
  11. # Workers Observability — structured logs, latency tracking, error rates
  12. # all surface in the Worker's Observability tab in the dashboard.
  13. [observability]
  14. enabled = true
  15. [vars]
  16. # CORS allowed origin. Override per-environment.
  17. # In production, set this to your customer-facing domain (e.g. "https://example.com").
  18. # Leaving as "*" for development; production deploys MUST set this explicitly.
  19. ALLOWED_ORIGIN = "*"
  20. # Optional: defense against cross-site token replay. If set, the Worker
  21. # rejects siteverify responses whose hostname doesn't match. Set this to
  22. # your customer-facing domain (e.g. "www.example.com") for additional safety
  23. # on single-domain deployments. Leave empty for multi-site deployments.
  24. # EXPECTED_HOSTNAME = ""
  25. # Log verbosity. One of: debug, info, warn, error.
  26. LOG_LEVEL = "info"
  27. # Secrets — never commit. Set via:
  28. # wrangler secret put TURNSTILE_SECRET_KEY
  29. # For local dev, create .dev.vars (gitignored) with:
  30. # TURNSTILE_SECRET_KEY=your-secret-here