public static IApplicationBuilder UseRewriteMiddleware(this IApplicationBuilder builder, Action <RewriteMiddlewareConfig> configurator) { var config = new RewriteMiddlewareConfig(); configurator(config); return(builder.UseMiddleware <RewriteMiddleware>(config)); }
public RewriteMiddleware(RequestDelegate next, RewriteMiddlewareConfig config) { _next = next; this._config = config; }