瀏覽代碼

fix: API_KEY_ALLOWED_ENDPOINTS

Timothy Jaeryang Baek 4 月之前
父節點
當前提交
99c3194181
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      backend/open_webui/utils/auth.py

+ 3 - 3
backend/open_webui/utils/auth.py

@@ -99,9 +99,9 @@ def get_current_user(
         if request.app.state.config.ENABLE_API_KEY_ENDPOINT_RESTRICTIONS:
             allowed_paths = [
                 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: