mirror of
https://github.com/langgenius/dify.git
synced 2026-04-28 20:17:29 +08:00
fix: handle empty token in wraps
This commit is contained in:
parent
6c133dc45c
commit
3c3261b42e
@ -78,6 +78,8 @@ def decode_jwt_token():
|
|||||||
return app_model, end_user
|
return app_model, end_user
|
||||||
except Unauthorized as e:
|
except Unauthorized as e:
|
||||||
if system_features.webapp_auth.enabled:
|
if system_features.webapp_auth.enabled:
|
||||||
|
if not app_code:
|
||||||
|
raise Unauthorized("Please re-login to access the web app.")
|
||||||
app_web_auth_enabled = (
|
app_web_auth_enabled = (
|
||||||
EnterpriseService.WebAppAuth.get_app_access_mode_by_code(app_code=str(app_code)).access_mode != "public"
|
EnterpriseService.WebAppAuth.get_app_access_mode_by_code(app_code=str(app_code)).access_mode != "public"
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user