Skip to content

Fix rate limiting not disabled when ENV is unset in local dev#715

Merged
rickyrombo merged 2 commits intomjp-rate-limit-devfrom
copilot/sub-pr-712
Mar 11, 2026
Merged

Fix rate limiting not disabled when ENV is unset in local dev#715
rickyrombo merged 2 commits intomjp-rate-limit-devfrom
copilot/sub-pr-712

Conversation

Copy link
Contributor

Copilot AI commented Mar 11, 2026

isLocalDev only checked for "dev" and "development", but config/config.go treats ENV="" identically (same switch fallthrough). With ENV unset, rate limiting remained enabled despite the local dev intent.

Changes

  • api/server.go: Add config.Env == "" to isLocalDev to match config.go semantics:
// Before
isLocalDev := config.Env == "dev" || config.Env == "development"

// After
isLocalDev := config.Env == "dev" || config.Env == "development" || config.Env == ""

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: rickyrombo <3690498+rickyrombo@users.noreply.github.com>
Copilot AI changed the title [WIP] Update to address feedback on disabling rate limits in local dev Fix rate limiting not disabled when ENV is unset in local dev Mar 11, 2026
@rickyrombo rickyrombo marked this pull request as ready for review March 11, 2026 02:44
@rickyrombo rickyrombo merged commit 2a45b9e into mjp-rate-limit-dev Mar 11, 2026
1 check passed
@rickyrombo rickyrombo deleted the copilot/sub-pr-712 branch March 11, 2026 02:44
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