You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
586 B
24 lines
586 B
using ce.autofac.extension;
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
namespace learun.util
|
|
{
|
|
/// <summary>
|
|
/// 版 本 EasyCode EC管理后台
|
|
/// Copyright (c) 2019-present EC管理有限公司
|
|
/// 创建人:tobin
|
|
/// 日 期:2019.09.02
|
|
/// 描 述:web帮助类
|
|
/// </summary>
|
|
public static class WebHelper
|
|
{
|
|
/// <summary>
|
|
/// 获取访问的客户客户端IP
|
|
/// </summary>
|
|
public static string GetClinetIP()
|
|
{
|
|
var accessor = IocManager.Instance.GetService<IHttpContextAccessor>();
|
|
return accessor.HttpContext.Connection.RemoteIpAddress.ToString();
|
|
}
|
|
}
|
|
}
|