From 41e3ecc8376125034a89914ad8f74dc695eb910f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B9=9B=E9=9C=B2=E5=85=88=E7=94=9F?= Date: Wed, 11 Jun 2025 16:57:24 +0800 Subject: [PATCH] fix remote ip header CF-Connecting-IP (#20846) --- api/libs/helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/libs/helper.py b/api/libs/helper.py index 070e575db..3f2a63095 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: