getting ip addresses
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Simple_Not 2022-11-02 00:58:07 +10:00
parent 5228f74c49
commit 0dc55aa9df

View File

@ -10,7 +10,7 @@ namespace NeDvachAPI.Controllers
[HttpGet(Name = "GetPosts")]
public string Get()
{
var remoteIpAddress = request.HttpContext.Connection.RemoteIpAddress;
var remoteIpAddress = httpContext.GetFeature<IHttpConnectionFeature>()?.RemoteIpAddress;
//Post[] posts = DBchat.DbList();
List<Post> posts = DBchat.DbList();