From 3aaaac3c5ff6a1ceb2da06802faa9320e2cb6370 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 21 May 2018 21:18:19 -0400 Subject: [PATCH] ip endpoint --- src/Api/Controllers/MiscController.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Api/Controllers/MiscController.cs b/src/Api/Controllers/MiscController.cs index eec7e87abf..b01cd1a600 100644 --- a/src/Api/Controllers/MiscController.cs +++ b/src/Api/Controllers/MiscController.cs @@ -18,5 +18,15 @@ namespace Bit.Api.Controllers { return new VersionResponseModel(); } + + [HttpGet("~/ip")] + public JsonResult Ip() + { + return new JsonResult(new + { + Ip = HttpContext.Connection?.RemoteIpAddress?.ToString(), + Headers = HttpContext.Request?.Headers, + }); + } } }