++
This commit is contained in:
+11
-1
@@ -17,7 +17,17 @@ app.MapWhen(ctx => ctx.Request.Path.StartsWithSegments("/zero/api"), branch =>
|
||||
branch.UsePathBase(new PathString("/zero/api"));
|
||||
branch.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapControllers();
|
||||
// TODO https://www.codeproject.com/Questions/5262381/How-to-add-prefix-to-URL-in-MVC-based-on-roles
|
||||
// see
|
||||
/*
|
||||
* routes.MapRoute(
|
||||
name: "Default",
|
||||
url: "{role}/{controller}/{action}/{id}",
|
||||
defaults: new { role = "User", controller = "Home", action = "Index", id = UrlParameter.Optional }
|
||||
).RouteHandler = new UserRoleHandler();
|
||||
|
||||
*/
|
||||
endpoints.MapControllerRoute("name", "pattern").
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user