Skip to content

Implement Sliding Window Rate Limit Header Exposure (X-RateLimit-Remaining) #69

Description

@hardikkaurani

🟡 Intermediate Issue

Problem

The RateLimitingMiddleware enforces rate limits but does not expose standard HTTP rate limit headers to API consumers.

Why It Matters

Exposing X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers allows API clients to implement intelligent backoff strategies.

Suggested Files

  • backend/app/core/production_security.py

Definition of Done

  • Rate limit headers attached to all API responses.
  • Headers tested via pytest with mock Redis counters.
  • Existing rate limiting behavior unchanged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend API, database, and business logichelp wantedExtra attention is neededperformancePerformance optimizations and database indexing

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions