mirror of
https://github.com/open-webui/open-webui
synced 2024-12-29 15:25:29 +00:00
refac
This commit is contained in:
parent
1e974439d9
commit
4f93ecf519
@ -97,7 +97,10 @@ def get_current_user(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if request.app.state.ENABLE_API_KEY_ENDPOINT_RESTRICTIONS:
|
if request.app.state.ENABLE_API_KEY_ENDPOINT_RESTRICTIONS:
|
||||||
allowed_paths = str(request.app.state.API_KEY_ALLOWED_ENDPOINTS).split(",")
|
allowed_paths = [
|
||||||
|
path.strip()
|
||||||
|
for path in str(request.app.state.API_KEY_ALLOWED_PATHS).split(",")
|
||||||
|
]
|
||||||
|
|
||||||
if request.url.path not in allowed_paths:
|
if request.url.path not in allowed_paths:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
|
Loading…
Reference in New Issue
Block a user