Rate-limit the key-injector proxy path (120/min) — only unthrottled sensitive route left
This commit is contained in:
1 parent
6f0c728513
commit
778a7f8fd2
1 file changed
+1
@@ -1580,6 +1580,7 @@ async def list_models(request: Request):
|
||||
|
||||
|
||||
@app.api_route("/v1/{path:path}", methods=["GET", "POST", "PUT", "DELETE", "PATCH"])
|
||||
@limiter.limit("120/minute")
|
||||
async def inject_key(request: Request, path: str):
|
||||
"""Read the member's email from a header, inject their key, forward to LiteLLM."""
|
||||
# Verify the request came through the chat frontend, so a direct caller
|
||||
|
||||
Reference in new issue
Block a user