Skip to content

Rate limit /query and /inject graph endpoints (#35) - #56

Merged
askmy-stack merged 1 commit into
mainfrom
security/cortex-35-rate-limit-query-inject
Aug 2, 2026
Merged

Rate limit /query and /inject graph endpoints (#35)#56
askmy-stack merged 1 commit into
mainfrom
security/cortex-35-rate-limit-query-inject

Conversation

@askmy-stack

Copy link
Copy Markdown
Owner

Summary

  • Add slowapi Limiter on POST /query and POST /inject
  • Env overrides: CORTEX_RATE_LIMIT_QUERY (default 30/minute), CORTEX_RATE_LIMIT_INJECT (default 60/minute)
  • Document limits in README; cover 429 behavior in API tests

Closes #35

Test plan

  • PYTHONPATH=. python3 -m pytest tests/api/test_main.py --no-cov -q

Made with Cursor

Defaults are 30/min for query and 60/min for inject, overridable via
CORTEX_RATE_LIMIT_QUERY and CORTEX_RATE_LIMIT_INJECT.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Aug 2, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cortex Ready Ready Preview Aug 2, 2026 10:28pm

@askmy-stack
askmy-stack merged commit d47516e into main Aug 2, 2026
4 checks passed
@askmy-stack
askmy-stack deleted the security/cortex-35-rate-limit-query-inject branch August 2, 2026 22:40
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.

API rate limiting on expensive graph endpoints

1 participant