public GeoBlockingPolicyBuilder Allow( IEnumerable<GeoLocation> geoLocations )
Parameters
- geoLocations
- country or regions to allowed
Return Value
the builder
public GeoBlockingPolicyBuilder Allow( IEnumerable<GeoLocation> geoLocations )
app.UseFireWall().UseGeoBlockingMiddleware(options => { options.Block(new[] { Walter.Web.FireWall.BOM.Geo.GeoLocation.NorthKorea }); //using MaxMind files and specify absolute path options.UseFile(@"D:\MaxMind\GeoLite2-City.mmdb", Walter.Web.FireWall.Geo.ContentType.CityData); options.UseFile(@"D:\MaxMind\GeoLite2-Country.mmdb", Walter.Web.FireWall.Geo.ContentType.GeoData); });
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2