Commit 6f001fb5 authored by Savorboard's avatar Savorboard

remove matchPath

parent 41cf35d1
...@@ -36,12 +36,9 @@ namespace Microsoft.AspNetCore.Builder ...@@ -36,12 +36,9 @@ namespace Microsoft.AspNetCore.Builder
return app; return app;
} }
public static IApplicationBuilder UseCapDashboard( public static IApplicationBuilder UseCapDashboard(this IApplicationBuilder app)
this IApplicationBuilder app,
string pathMatch = "/cap")
{ {
if (app == null) throw new ArgumentNullException(nameof(app)); if (app == null) throw new ArgumentNullException(nameof(app));
if (pathMatch == null) throw new ArgumentNullException(nameof(pathMatch));
var marker = app.ApplicationServices.GetService<CapMarkerService>(); var marker = app.ApplicationServices.GetService<CapMarkerService>();
...@@ -50,12 +47,9 @@ namespace Microsoft.AspNetCore.Builder ...@@ -50,12 +47,9 @@ namespace Microsoft.AspNetCore.Builder
throw new InvalidOperationException("Add Cap must be called on the service collection."); throw new InvalidOperationException("Add Cap must be called on the service collection.");
} }
app.Map(new PathString(pathMatch), x => app.UseMiddleware<GatewayProxyMiddleware>();
{ app.UseMiddleware<DashboardMiddleware>();
x.UseMiddleware<DashboardMiddleware>();
x.UseMiddleware<GatewayProxyMiddleware>();
});
return app; return app;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment