Skip to content

fix(create-a-container): loosen in-app rate limit by removing entirely - #429

Open
cmyers-mieweb wants to merge 2 commits into
mainfrom
cmyers_issue403
Open

fix(create-a-container): loosen in-app rate limit by removing entirely#429
cmyers-mieweb wants to merge 2 commits into
mainfrom
cmyers_issue403

Conversation

@cmyers-mieweb

Copy link
Copy Markdown
Collaborator

Issue: #403

The previous limiter counted 4xx/5xx (excluding 404) as failures with a tiny budget of 10 per 5 minutes. With the SPA + OIDC flow, 401 and other 4xx responses are a normal part of the auth handshake, so legitimate users were throttled. Replace it with a lenient safety-net limiter that counts every request (1000/min per IP) and leave real rate limiting to the load balancer.

…ncer

The previous limiter counted 4xx/5xx (excluding 404) as failures with a tiny
budget of 10 per 5 minutes. With the SPA + OIDC flow, 401 and other 4xx
responses are a normal part of the auth handshake, so legitimate users were
throttled. Replace it with a lenient safety-net limiter that counts every
request (1000/min per IP) and leave real rate limiting to the load balancer.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates create-a-container’s in-app rate limiting to avoid throttling legitimate SPA + OIDC authentication flows (where 401/other 4xx responses are expected), and instead leaves “real” throttling to the load balancer while keeping a high-ceiling safety net in the app.

Changes:

  • Replaces the previous “failed-request-only” limiter with a lenient per-request limiter (1000 requests/minute per client IP).
  • Enables modern rate-limit response headers and disables legacy headers.

Comment thread create-a-container/app.js Outdated
Rate limiting is enforced at the load balancer. The in-app limiter added
little value and its status-code classification throttled legitimate SPA +
OIDC users on expected 401 responses. Drop express-rate-limit, the buildApp
rateLimit option, and its test overrides.
@cmyers-mieweb

Copy link
Copy Markdown
Collaborator Author

I went ahead and just blew away the rate limit for now, if we see a use case where we need it in the future, I can readd it.

@cmyers-mieweb cmyers-mieweb changed the title fix(create-a-container): loosen in-app rate limit, defer to load balancer fix(create-a-container): loosen in-app rate limit by removing entirely Jul 30, 2026
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