Your Cloudflare Pages secret is set. Production cannot see it.
Your Cloudflare Pages secret is set. wrangler pages secret list shows it. Production cannot see it. I lost most of a day to this on a paid download route, so here is the mechanism, the one-line reason, and a check you can run that answers it exactly instead of guessing. The symptom Two delivery routes on a Pages project started returning 403 to everyone. The routes read a secret, the secret was…
Your Cloudflare Pages secret is set, but production cannot see it. A secret list shows it exists, yet the production environment fails to access it, resulting in 403 errors. This issue arises because secrets are only available to a Pages project during deployment time. They are not accessible during runtime.
This behavior differs from Workers, where secrets apply to the running script. The symptom involves two delivery routes reading a secret and failing closed, which is correct behavior but invisible from outside.
The root cause is that secrets are bound to a deployment at deploy time, not looked up per-request from a live project-level store. Setting a secret with `wrangler pages secret put` does not affect the currently-serving build. It only changes what the next build will see. The `secret list` command shows the secret is present, but it does not indicate whether production can access it.
To detect this issue, redeploy after setting a secret. The secret will then be bound in the new deployment. There is no modification time available for secrets, but you can compare the set of secrets in the current deployment to the set of secrets in the last successful deployment. This difference will indicate if production can actually see the secret.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.