Commit 463c4d8
fix: require authentication on validate-api-key endpoint (#481)
* fix: require authentication on validate-api-key endpoint
The POST /api/validate-api-key endpoint was missing the @token_required
decorator, allowing unauthenticated users to proxy LLM API calls through
the server. Add @token_required to match all other POST endpoints.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: suppress pylint unused-argument for decorated request param
The @token_required decorator consumes the request argument before the
function body, so pylint incorrectly flags it as unused.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: add 401 response to OpenAPI docs for validate-api-key
Add responses={401: UNAUTHORIZED_RESPONSE} to match the convention
used by all other @token_required endpoints.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 5e7f6a7 commit 463c4d8
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
24 | | - | |
25 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
31 | | - | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
0 commit comments