示例#1
0
 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);
 }
示例#3
0
 public XfoMiddleware(AppFunc next, XFrameOptions options)
     : base(next)
 {
     _config = options;
     var headerGenerator = new HeaderGenerator();
     _headerResult = headerGenerator.CreateXfoResult(_config);
 }
示例#4
0
        public HpkpMiddleware(AppFunc next, HpkpOptions options, bool reportOnly)
            : base(next)
        {
            _config = options.Config;

            var headerGenerator = new HeaderGenerator();
            _headerResult = headerGenerator.CreateHpkpResult(_config, reportOnly);
        }
示例#5
0
        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);
        }
示例#7
0
        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();
 }