weixin_39683021
weixin_39683021
2020-12-28 08:33

Disallow Routes

Looking for sample code regarding routing only to login-logout and tenant routes.

    private void ConfigRoutes(IRouteBuilder routes)
    {
        routes.MapRoute("Default", "{__tenant__=}/{controller=SomeController}/{action=Index}");
        routes.MapRoute("Login", "{controller=Account}/{action=Login}");
    }

As per examples ConfigRoutes is called by both service setup WithRouteStrategy and UseMvc in the pipeline.

Perhaps I'm having a misunderstanding of routing, but would like routes that don't provide "tenant" to not work.

Any guidance is appreciated.

该提问来源于开源项目:Finbuckle/Finbuckle.MultiTenant

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

8条回答