fix get_ip_addr
This commit is contained in:
1 parent
10582cc1fc
commit
7e709db0cc
1 file changed
+2
-1
+2
-1
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user