📅  最后修改于: 2022-03-11 14:59:06.078000             🧑  作者: Mango
private static string GetIpFromRequestHeaders(HttpRequest request)
{
return (request.Headers["X-Forwarded-For"].FirstOrDefault() ?? "").Split(new char[] { ':' }).FirstOrDefault();
}