Skip to content

fix: handle missing Request object and make it optional#267

Open
d-shiri wants to merge 3 commits intolaurentS:masterfrom
d-shiri:no-request
Open

fix: handle missing Request object and make it optional#267
d-shiri wants to merge 3 commits intolaurentS:masterfrom
d-shiri:no-request

Conversation

@d-shiri
Copy link
Copy Markdown

@d-shiri d-shiri commented Apr 5, 2026

Use a ContextVar to propagate the current request from middleware, so endpoints no longer need an explicit request parameter. The middleware sets the context and the limiter decorator falls back to it when no request arg is found.

@d-shiri d-shiri changed the title Make request parameter optional in rate-limited endpoints fix: handle missing Request object and make it optional Apr 5, 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.

1 participant