public PoweredByMiddleware(RequestDelegate next, IPoweredByMiddlewareOptions options)
 {
     base();
     this._next    = next;
     this._options = options;
     return;
 }
예제 #2
0
        public async Task InvokeAsync(HttpContext context, IPoweredByMiddlewareOptions options)
        {
            if (options.Enabled)
            {
                context.Response.Headers[options.HeaderName] = options.HeaderValue;
            }

            await _next.Invoke(context);
        }
예제 #3
0
 public PoweredByMiddleware(RequestDelegate next, IPoweredByMiddlewareOptions options)
 {
     _next    = next;
     _options = options;
 }