示例#1
0
        public static IApplicationBuilder UseSecurityHeaders(this IApplicationBuilder builder, Action <SecurityHeaderOptions> headerOptions)
        {
            var options = new SecurityHeaderOptions();

            headerOptions(options);
            return(builder.UseMiddleware <SecurityHeaders>(options));
        }
示例#2
0
 public SecurityHeaders(RequestDelegate next, SecurityHeaderOptions options)
 {
     this._next    = next;
     this._options = options;
 }