PushizoDocs
Security & compliance

Bot protection (Cloudflare Turnstile)

Protecting sign-up, password reset and verification email resend with Cloudflare Turnstile — environment variables, dashboard behavior, API errors, CSP and the disabled state.

Pushizo can optionally protect three public flows that are open to abuse with Cloudflare Turnstile: sign-up, password reset requests and verification email resend. Turnstile is an invisible/non-interactive challenge; it does not show users a CAPTCHA puzzle.

Setup

  1. Cloudflare → Turnstile → Add site: domain (app.pushizo.com or your own dashboard domain), widget type Managed or Invisible.
  2. Two variables in the server environment:
VariableWhereDescription
TURNSTILE_SITE_KEYAPIPublic site key; the dashboard reads it via GET /internal/v1/auth/config (public) and only renders the widget if the key is present
TURNSTILE_SECRET_KEYAPISecret key; if it is set without a site key, the configuration is rejected
  1. Restart the API and the dashboard. In a Compose installation, the variables are passed to the API service through .env.prod (installing with Compose).

Behavior

  • When the secret key is set, turnstile_token is required in the body of those three requests; the dashboard form adds the token it receives from the widget automatically.
  • The server verifies the token against the Cloudflare siteverify endpoint (5 s timeout).
ConditionResponse
Token missing400 captcha_required
Token invalid/expired400 captcha_failed (the widget is refreshed)
Cloudflare unreachable503 captcha_unavailable — fail-closed: a request that cannot be verified is not accepted
  • When the keys are empty, behavior does not change: the widget is not rendered and turnstile_token is not required; local development and E2E tests run in this mode.
  • The dashboard CSP includes the challenges.cloudflare.com source for script-src, connect-src and frame-src; if you have your own proxy/CSP layer, allow the same source.

White-label domains

On custom dashboard domains (white-label), the Turnstile site key must also be configured in Cloudflare for that domain; otherwise the widget returns a 110200 domain error.

Related protections

Independently of Turnstile, the sign-up and login endpoints are protected by an IP-based nginx limit (auth_ip, 5 r/s) and in-app rate limiting; for login lockout, the disposable email domain block and new org limits, see the security overview.

On this page