【文件属性】:
文件名称:指定IP地址才能访问API
文件大小:2KB
文件格式:ZIP
更新时间:2022-01-09 05:39:11
IP IpFilter IpHelper
string ip = IpHelper.GetRealIP();
if (ip == ConfigurationManager.AppSettings["ApiUrl"])
{
//HttpContext.Current.Response.Write("[]");
//创建响应对象,初始化为成功,没有指定的话本次请求将不会被拦截182.40.119.193
actionContext.Response = new HttpResponseMessage(System.Net.HttpStatusCode.OK);
}
【文件预览】:
IpHelper.txt
IpFilter.txt