For .NET Core Functions, we usually use Microsoft.AspNetCore.Http.HttpRequest
.
When we create a Http trigger template, we can see it.
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
ILogger log)
Then get remote IP
var remoteAddress = req.HttpContext.Connection.RemoteIpAddress;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…