/// <summary> /// Initializes a new instance of the <see cref="ResponseHeaderMiddleware"/> class. /// </summary> /// <param name="next"></param> /// <param name="options"><see cref="ResponseHeaderMiddlewareOptions"/> to use to customize the current <see cref="ResponseHeaderMiddleware"/> behavior.</param> public ResponseHeaderMiddleware(RequestDelegate next, ResponseHeaderMiddlewareOptions options) { _next = next ?? throw new ArgumentNullException(nameof(next)); _options = options ?? new ResponseHeaderMiddlewareOptions(); }
public static void ConfigureResponseHeaderMiddleware(this IApplicationBuilder app, ResponseHeaderMiddlewareOptions options) { app.UseMiddleware <ResponseHeaderMiddleware>(options); }