diff --git a/src/Api/Controllers/InfoController.cs b/src/Api/Controllers/InfoController.cs index fcd41540d..edfd18c79 100644 --- a/src/Api/Controllers/InfoController.cs +++ b/src/Api/Controllers/InfoController.cs @@ -17,18 +17,4 @@ public class InfoController : Controller { return Json(AssemblyHelpers.GetVersion()); } - - [HttpGet("~/ip")] - public JsonResult Ip() - { - var headerSet = new HashSet { "x-forwarded-for", "x-connecting-ip", "cf-connecting-ip", "client-ip", "true-client-ip" }; - var headers = HttpContext.Request?.Headers - .Where(h => headerSet.Contains(h.Key.ToLower())) - .ToDictionary(h => h.Key); - return new JsonResult(new - { - Ip = HttpContext.Connection?.RemoteIpAddress?.ToString(), - Headers = headers, - }); - } }