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 remote ip header CF-Connecting-IP (#20846)

湛露先生41e3ecc83761
diff --git a/api/libs/helper.py b/api/libs/helper.py
index 070e575dbc1..3f2a6309567 100644
--- a/api/libs/helper.py
+++ b/api/libs/helper.py
@@ -185,7 +185,7 @@ def generate_string(n):
def extract_remote_ip(request) -> str:
if request.headers.get("CF-Connecting-IP"):
- return cast(str, request.headers.get("Cf-Connecting-Ip"))
+ return cast(str, request.headers.get("CF-Connecting-IP"))
elif request.headers.getlist("X-Forwarded-For"):
return cast(str, request.headers.getlist("X-Forwarded-For")[0])
else: