public XXssMiddleware(AppFunc next, XXssProtectionOptions options) : base(next) { _config = options; var headerGenerator = new HeaderGenerator(); _headerResult = headerGenerator.CreateXXssProtectionResult(_config); }
public XDownloadOptionsMiddleware(AppFunc next) : base(next) { _config = new SimpleBooleanConfiguration { Enabled = true }; var headerGenerator = new HeaderGenerator(); _headerResult = headerGenerator.CreateXDownloadOptionsResult(_config); }
public XfoMiddleware(AppFunc next, XFrameOptions options) : base(next) { _config = options; var headerGenerator = new HeaderGenerator(); _headerResult = headerGenerator.CreateXfoResult(_config); }
public HpkpMiddleware(AppFunc next, HpkpOptions options, bool reportOnly) : base(next) { _config = options.Config; var headerGenerator = new HeaderGenerator(); _headerResult = headerGenerator.CreateHpkpResult(_config, reportOnly); }
public HstsMiddleware(AppFunc next, HstsOptions options) : base(next) { _config = options; var headerGenerator = new HeaderGenerator(); _headerResult = headerGenerator.CreateHstsResult(_config); }
public XRobotsTagMiddleware(AppFunc next, XRobotsTagOptions options) : base(next) { _config = options.Config; var headerGenerator = new HeaderGenerator(); _headerResult = headerGenerator.CreateXRobotsTagResult(_config); }
public CspMiddleware(AppFunc next, ICspConfiguration options, bool reportOnly) : base(next) { _config = options; _reportOnly = reportOnly; var headerGenerator = new HeaderGenerator(); _headerResult = headerGenerator.CreateCspResult(_config, reportOnly); }
public void Setup() { _generator = new HeaderGenerator(); }