mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 10:38:15 +08:00
mapped admin path works for manual test
This commit is contained in:
13
src/Ocelot/Controllers/ReRoutesController.cs
Normal file
13
src/Ocelot/Controllers/ReRoutesController.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Ocelot.Controllers
|
||||
{
|
||||
[RouteAttribute("reroutes")]
|
||||
public class ReRoutesController
|
||||
{
|
||||
public IActionResult Get()
|
||||
{
|
||||
return new OkObjectResult("hi from re routes controller");
|
||||
}
|
||||
}
|
||||
}
|
@ -31,7 +31,16 @@ namespace Ocelot.Middleware
|
||||
public static IApplicationBuilder UseOcelot(this IApplicationBuilder builder)
|
||||
{
|
||||
CreateConfiguration(builder);
|
||||
|
||||
builder.Map("/admin", x =>
|
||||
{
|
||||
x.UseMvc();
|
||||
});
|
||||
|
||||
builder.UseOcelot(new OcelotMiddlewareConfiguration());
|
||||
|
||||
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user