public SecurityHeadersMiddleware(RequestDelegate next, SecurityHeadersPolicy policy)
 {
     _next   = next;
     _policy = policy;
 }
        public static IApplicationBuilder UseSecurityHeadersMiddleware(this IApplicationBuilder app, SecurityHeadersBuilder builder)
        {
            SecurityHeadersPolicy policy = builder.Build();

            return(app.UseMiddleware <SecurityHeadersMiddleware>(policy));
        }
Esempio n. 3
0
 public SecurityHeadersBuilder()
 {
     _policy = new SecurityHeadersPolicy();
 }