mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-27 17:51:36 +00:00
OAI: Restrict list permissions for API keys
API keys are not allowed to view all the admin's models, templates, draft models, loras, etc. Basically anything that can be viewed on the filesystem outside of anything that's currently loaded is not allowed to be returned unless an admin key is present. This change helps preserve user privacy while not erroring out on list endpoints that the OAI spec requires. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -106,8 +106,7 @@ def get_key_permission(request: Request):
|
||||
|
||||
|
||||
async def check_api_key(
|
||||
x_api_key: str = Header(None),
|
||||
authorization: str = Header(None)
|
||||
x_api_key: str = Header(None), authorization: str = Header(None)
|
||||
):
|
||||
"""Check if the API key is valid."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user