feat: Change endpoint to GET for retrieving OpenRouter API key with basic security check

This commit is contained in:
Slipstream 2025-05-14 17:10:12 -06:00
parent eef8800716
commit 65ccfeba91
Signed by: slipstream
GPG Key ID: 13E498CE010AC6FD

View File

@ -2827,8 +2827,8 @@ async def delete_token_by_user_id(user_id: str):
# Note: Server shutdown is now handled by the lifespan context manager above # Note: Server shutdown is now handled by the lifespan context manager above
@app.post("/openrouter-key", response_class=PlainTextResponse) @app.get("/openrouter-key", response_class=PlainTextResponse)
async def update_gurt_stats_internal(request: Request): async def get_openrouter_key(request: Request):
"""private endpoint return openrouter api key""" """private endpoint return openrouter api key"""
global latest_gurt_stats global latest_gurt_stats
# Basic security check # Basic security check