feat: opt-in Cloudflare Turnstile on login and register (golem15.user.turnstile)

- empty (default) adds nothing; open or closed appends turnstile:{mode} to
  POST /login and /register only; any other value fails boot naming the key
- TestTurnstileRoutesSmoke records the declared routes with a recording router
This commit is contained in:
Jakub Zych
2026-10-20 14:45:22 +02:00
parent 4c5d3b8935
commit 7b9faa3419
4 changed files with 180 additions and 2 deletions

View File

@@ -24,3 +24,8 @@ api_tokens:
prefix: usr_
privileged_groups:
- admin
# Cloudflare Turnstile on POST /login and /register. Empty (the default) adds
# nothing. "open" lets requests pass when Cloudflare is unreachable, "closed"
# refuses them. The turnstile:* middleware comes from the framework (summercms
# v0.3.0 and later); its secret is turnstile.secret (SUMMER_TURNSTILE__SECRET).
turnstile: ""