Skip to content

Custom Routing for a multi-tenant application #15369

@LaughingJohn

Description

@LaughingJohn

Is your feature request related to a problem? Please describe.

We have a multi tenant / multi system application. We can tell the tenant (user's AD) from the user who is signed in, but we need to distinguish the system they are accessing (org).
So I want to be able to do the following:

  1. Have the org in the URL:
    https://mydomain/org1/mypage
    https://mydomain/org2/mypage
  2. If the default url is chosen https://mydomain/ then we want to direct to a page that allows them to choose the org. I'm not too worried about this bit, but include it for completeness.

Describe the solution you'd like

  1. I don't want to include the org as a parameter in the page route itself. So I want to be able to use @page "/mypage".
  2. Ideally, when I click a navlink I want it to go the linked page with the "org" part of the url intact, without supplying it. So /mylinkedpage would go to https://mydomain/org1/mylinkedpage
  3. Ideally it would be good to be able to call GetJsonAsync etc. without having to supply the org in the path.

Additional context

Is there any way of achieving this currently?
Do I have to write a custom router to do it?
If so, do you have any examples/advice on doing so?

Thank you!

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions