Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: site enable check (#645)

crazywoolaf9412f5fdbaa
diff --git a/api/controllers/web/wraps.py b/api/controllers/web/wraps.py
index 4d48a190f2a..314a4099ee4 100644
--- a/api/controllers/web/wraps.py
+++ b/api/controllers/web/wraps.py
@@ -38,6 +38,8 @@ def decode_jwt_token():
app_model = db.session.query(App).filter(App.id == decoded['app_id']).first()
if not app_model:
raise NotFound()
+ if app_model.enable_site is False:
+ raise Unauthorized('Site is disabled.')
end_user = db.session.query(EndUser).filter(EndUser.id == decoded['end_user_id']).first()
if not end_user:
raise NotFound()