Repository navigation
Release: Cloudflare Turnstile on network request and internship forms - #140
Merged
Merged
Conversation
…Cloudflare Turnstile The network request and internship application forms are the public, unauthenticated POSTs of the site. The honeypot and per-IP throttle stay; Turnstile adds a server-side verified bot check alongside them. - TurnstileRule verifies the token against Cloudflare siteverify (5 s timeout) and fails on missing, invalid or unverifiable tokens - widget and check are active only when TURNSTILE_SITE_KEY and TURNSTILE_SECRET_KEY are set, so local development and CI need no keys - both GET pages already use DoNotCacheResponse, so no cached copy can serve a stale widget - CSP allows challenges.cloudflare.com for scripts and frames - the token is neither stored nor mailed; the controllers only read email - signed application and manage routes are unchanged Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A developer .env with real TURNSTILE_* keys switched the check on for every form test that posts without a token. phpunit now blanks both keys; tests that cover Turnstile enable it themselves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST network/request) and the internship application form (POST jobs/internship), alongside the existing honeypot and throttle.TurnstileRuleverifies the token server-side (siteverify, 5 s timeout); missing, rejected or unverifiable tokens fail with a translated message (de_CH, en_CH).challenges.cloudflare.comforscript-src/script-src-elemandframe-src.DoNotCacheResponse, so no cached copy serves a stale widget. Signed application/manage routes are unchanged.Activation
The check stays off until
TURNSTILE_SITE_KEYandTURNSTILE_SECRET_KEYare set in the Laravel Cloud production environment (then redeploy). Without them the forms behave exactly as before.🤖 Generated with Claude Code