mirror of
https://github.com/YFGaia/dify-plus.git
synced 2026-06-04 10:14:00 +08:00
fix: fastopenapi路由认证
This commit is contained in:
@@ -48,7 +48,10 @@ def load_user_from_request(request_from_flask_login):
|
|||||||
account.current_tenant = tenant
|
account.current_tenant = tenant
|
||||||
return account
|
return account
|
||||||
|
|
||||||
if request.blueprint in {"console", "inner_api"}:
|
# extend: start fastopenapi路由认证,/console/api/ 路径无blueprint时按console处理
|
||||||
|
is_console_path = request.blueprint is None and request.path.startswith("/console/api/")
|
||||||
|
if request.blueprint in {"console", "inner_api"} or is_console_path:
|
||||||
|
# extend: stop fastopenapi路由认证,/console/api/ 路径无blueprint时按console处理
|
||||||
if not auth_token:
|
if not auth_token:
|
||||||
raise Unauthorized("Invalid Authorization token.")
|
raise Unauthorized("Invalid Authorization token.")
|
||||||
decoded = PassportService().verify(auth_token)
|
decoded = PassportService().verify(auth_token)
|
||||||
|
|||||||
Reference in New Issue
Block a user