I'm trying to get the remote Ip address
On Startup.cs
app.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});
Then I use Request.HttpContext.Connection.RemoteIpAddress.ToString()
to retrieve the IP. I publish to the hosting and it returns wrong IP, somewhere in Hongkong instead of my real IP in other Asian country. I checked with a few pc in different location, all shows wrong IP.