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 issue with incorrect port number in app_base_url due to NAT networks (#6653)

mago960806a68df696ecd4
diff --git a/api/models/model.py b/api/models/model.py
index a6f517ea6b1..5afaf60b286 100644
--- a/api/models/model.py
+++ b/api/models/model.py
@@ -1116,7 +1116,7 @@ class Site(db.Model):
@property
def app_base_url(self):
return (
- dify_config.APP_WEB_URL if dify_config.APP_WEB_URL else request.host_url.rstrip('/'))
+ dify_config.APP_WEB_URL if dify_config.APP_WEB_URL else request.url_root.rstrip('/'))
class ApiToken(db.Model):