添加项目文件。
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
namespace Hua.WebTools.Controllers
|
||||
{
|
||||
public class ApiControllerBase
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Hua.WebTools.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class NetWorkController:ControllerBase
|
||||
{
|
||||
[HttpGet("[action]")]
|
||||
public IActionResult GetIp()
|
||||
{
|
||||
return Ok(HttpContext.Connection.RemoteIpAddress.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user