|
@@ -18,11 +18,6 @@ namespace Hotline.Api.Filter
|
|
|
{
|
|
|
if (!_whiteIps.Any()) return;
|
|
|
|
|
|
- //var ip = context.HttpContext.Connection.RemoteIpAddress?.ToString();
|
|
|
- //if (ip != null)
|
|
|
- //{
|
|
|
- // context.HttpContext.Items["ClientIp"] = ip;
|
|
|
- //}
|
|
|
var ip = context.HttpContext.Request.Headers["X-Forwarded-For"].FirstOrDefault();
|
|
|
if (string.IsNullOrEmpty(ip))
|
|
|
ip = context.HttpContext.Request.Headers["X-Real-IP"].FirstOrDefault();
|