Skip to content

set WORKER_ENV=production by default in wrangler config#546

Merged
St0rmz1 merged 1 commit intomainfrom
fix/worker-env-production-default
Feb 25, 2026
Merged

set WORKER_ENV=production by default in wrangler config#546
St0rmz1 merged 1 commit intomainfrom
fix/worker-env-production-default

Conversation

@St0rmz1
Copy link
Contributor

@St0rmz1 St0rmz1 commented Feb 25, 2026

defense in depth
Now defaults to 'production' in wrangler.jsonc so JWT env claim validation is enforced automatically.

Local dev overrides to 'development' via .dev.vars

defense in depth
Now defaults to 'production' in wrangler.jsonc so JWT env claim validation is enforced automatically.

Local dev overrides to 'development' via .dev.vars
@kiloconnect
Copy link
Contributor

kiloconnect bot commented Feb 25, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Clean configuration change that moves WORKER_ENV from a Cloudflare secret to a plain-text variable in wrangler.jsonc with a "production" default. This simplifies deployment (no wrangler secret put needed) and makes the production default explicit. The value is not sensitive — it controls JWT env claim matching and Fly app name prefixes, both of which are defense-in-depth checks.

Documentation in DEVELOPMENT.md and .dev.vars.example is updated consistently.

Files Reviewed (3 files)
  • kiloclaw/.dev.vars.example - Added comments explaining the WORKER_ENV=development override
  • kiloclaw/DEVELOPMENT.md - Updated docs to reflect new default behavior
  • kiloclaw/wrangler.jsonc - Added WORKER_ENV: "production" as a plain-text var

@St0rmz1 St0rmz1 merged commit 9b3dd0b into main Feb 25, 2026
12 checks passed
@St0rmz1 St0rmz1 deleted the fix/worker-env-production-default branch February 25, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants