public static RateLimitingOptions Allow(this RateLimitingOptions options, string name, Selector <bool> predicate) { return(options.Allow(name, predicate.ToAsync())); }
public static RateLimitingOptions Allow(this RateLimitingOptions options, string name, IPAddress address) { return(options.Allow(name, ctx => ctx.Connection.RemoteIpAddress.Equals(address))); }
public static RateLimitingOptions Allow(this RateLimitingOptions options, string name, IPNetwork network) { return(options.Allow(name, ctx => network.Contains(ctx.Connection.RemoteIpAddress))); }