mirror of
https://gitea.tendokyu.moe/Hay1tsme/artemis.git
synced 2026-02-13 19:27:27 +08:00
fix get_ip_addr
This commit is contained in:
@@ -34,7 +34,8 @@ class Utils:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_ip_addr(cls, req: Request) -> str:
|
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
|
@classmethod
|
||||||
def get_title_port(cls, cfg: CoreConfig):
|
def get_title_port(cls, cfg: CoreConfig):
|
||||||
|
|||||||
Reference in New Issue
Block a user