public sealed class HeaderConfig : Walter.Web.FireWall.Headers.ISecurityHeadersBuilder
public sealed class HeaderConfig : Walter.Web.FireWall.Headers.ISecurityHeadersBuilder
services.AddFireWall("Your Token", "Domain Key", domainName: new Uri("https://www.test.dll", UriKind.Absolute), options => { options.JoinCustomerImprovementProgramWithEmail = "mail@test.dll"; options.Cypher.ApplicationPassword = "123456Seven"; options.ApplicationName = "www.test.dll"; options.ApplicationTag = "WS3"; options.Rules.AllowWhiteListing = false; //view located in ~/Views/Shared options.Reporting.HealthReportView = "_healthReport"; options.Reporting.EmailReportView = "_EmailReport"; options.WebServices.IsUserApiUrl = new Uri(Links.IsUserEndpoint, UriKind.Relative); options.WebServices.RegisterLinksApiUrl = new Uri(Links.SiteMapEndPoint, UriKind.Relative); options.WebServices.BeaconApiUrl = new Uri(Links.BeaconPoint, UriKind.Relative); options.WebServices.CSPReportUrl = new Uri(Links.CSPViolation, UriKind.Relative); options.Cashing.GeoLocation.SlidingExpiration = TimeSpan.FromMinutes(20); options.Rules.BlockRequest.BlockDuration.SlideExpiration = true; options.Rules.BlockRequest.BlockDuration.Expires = TimeSpan.FromSeconds(10); options.Rules.AllowWhiteListing = false; options.Rules.Headers.AddDefaultSecurePolicy() .AddStrictTransportSecurityNoCache() .AddXssProtectionBlockAndReport() .AddContentSecurityPolicyButTrust(trustingSites: TrustingSites.Jquery | TrustingSites.Google , allowInline: true , framesPolicy: FramesPolicy.Self); //continue configuring add-ons for the firewall }).UseGeography(new System.IO.DirectoryInfo("D:\\MaxMind")) .UseDiskLogging(options => { options.Directory = @"D:\Firewall"; }) .UserDatabase(DatabaseConnections.FireWallState) .UseFireWallReportingDatabase(DatabaseConnections.FireWall) .UseSMTPReportingDatabase(DatabaseConnections.FireWallMail, options => { options.Archive = TimeSpan.FromDays(180); options.Server = "mail.asp-waf.com"; options.UserName = "noreply@test.dll"; options.Password = "Jhagga$ki82#@test.dll"; options.Port = 25; options.From = "noreply@@test.dll"; options.IgnoreServerCertificateErrors = true; options.DefaultEmail = "owner@@test.dll"; options.Archive = TimeSpan.FromDays(60); options.MailingList.AddRange(new[] { new EMailAddress("Security Admin","security@@test.dll") { Frequency= TimeSpan.FromHours(1), Roles= EMailRoles.FireWallAdministrationViolations | EMailRoles.UnauthorizedPhysicalFilesViolation } , new EMailAddress("Website Admin","WebMaster@@test.dll"){ Frequency= TimeSpan.FromHours(1), Roles= EMailRoles.ProductUpdates | EMailRoles.OwnAccountRelatedViolations } , }); }); //use filter on each request instead of middleware services.AddMvc(options => options.Filters.Add<Walter.Web.FireWall.Filters.FireWallFilter>());
System.Object
Walter.Web.FireWall.Configurations.HeaderConfig
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