/// <summary> /// /// </summary> /// <param name="httpContext"></param> /// <returns></returns> public ValidatorResponseDto Validate(HttpContext httpContext) { string realIp = httpContext.GetRealIp(); if (this._ipOptions.RuleType == IpRuleType.Black) { return(ValidatorResponseDto.Output(!this._ipOptions.IpList.Contains(realIp), _ipOptions.GetTip())); } return(ValidatorResponseDto.Output(this._ipOptions.IpList.Contains(realIp), this._ipOptions.GetTip())); }
/// <summary> /// 验证Url请求是否合法 /// </summary> /// <param name="httpContext"></param> /// <returns></returns> public ValidatorResponseDto Validate(HttpContext httpContext) { return(ValidatorResponseDto.Success()); }