mirror of https://github.com/langgenius/dify.git
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
|
||||
except Unauthorized as e:
|
||||
if system_features.webapp_auth.enabled:
|
||||
if not app_code:
|
||||
raise Unauthorized("Please re-login to access the web app.")
|
||||
app_web_auth_enabled = (
|
||||
EnterpriseService.WebAppAuth.get_app_access_mode_by_code(app_code=str(app_code)).access_mode != "public"
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue