diff --git a/core/utils.py b/core/utils.py index 469a03f..a9d1705 100644 --- a/core/utils.py +++ b/core/utils.py @@ -34,7 +34,8 @@ class Utils: @classmethod def get_ip_addr(cls, req: Request) -> str: - return req.headers.get("x-forwarded-for", req.client.host) + ip = req.headers.get("x-forwarded-for", req.client.host) + return ip.split(", ")[0] @classmethod def get_title_port(cls, cfg: CoreConfig):