public AntiXssMiddleware(RequestDelegate next, AntiXssMiddlewareOptions options)
 {
     _next    = next ?? throw new ArgumentNullException(nameof(next));
     _options = options;
 }
        public static IApplicationBuilder UseAntiXssMiddleware(this IApplicationBuilder builder, bool throwExceptionForXssRequest, Func <HttpContext, bool> excludeFromXssMiddlware)
        {
            AntiXssMiddlewareOptions options = new AntiXssMiddlewareOptions("A cross site scripting attack has been detected has been detected", throwExceptionForXssRequest, excludeFromXssMiddlware);

            return(builder.UseMiddleware <AntiXssMiddleware>(options));
        }