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

            return(app.UseMiddleware <SecurityHeadersMiddleware>(policy));
        }