mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
fix: API_KEY_ALLOWED_ENDPOINTS
This commit is contained in:
parent
0e805e7dc4
commit
99c3194181
@ -99,9 +99,9 @@ def get_current_user(
|
|||||||
if request.app.state.config.ENABLE_API_KEY_ENDPOINT_RESTRICTIONS:
|
if request.app.state.config.ENABLE_API_KEY_ENDPOINT_RESTRICTIONS:
|
||||||
allowed_paths = [
|
allowed_paths = [
|
||||||
path.strip()
|
path.strip()
|
||||||
for path in str(request.app.state.config.API_KEY_ALLOWED_PATHS).split(
|
for path in str(
|
||||||
","
|
request.app.state.config.API_KEY_ALLOWED_ENDPOINTS
|
||||||
)
|
).split(",")
|
||||||
]
|
]
|
||||||
|
|
||||||
if request.url.path not in allowed_paths:
|
if request.url.path not in allowed_paths:
|
||||||
|
Loading…
Reference in New Issue
Block a user