You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use EndpointDataSource to expose list of custom Endpoints, each one representing a Tenant in my system, more specifically that tenants RequestDelegate / middleware pipeline (lazily constructed, asynchronously, upon first execution of the endpoint)
Associate each endpoint with its own RouteTemplate that uses a custom constraint that will only succeed if the current Tenant ID (from HttpContext.Items) matches that endpoints Tenant ID. e.g: '{**path:tenant(1)}' for the endpoint for Tenant 1, '{**path:tenant(1)}' for the endpoint for Tenant 2 etc.
Keep the logic that runs on every request and works out what the TenantID is, in a middleware component, added at the start of the pipeline. It puts the value in HttpContext.Items. This then means the the Endpoints stuff - which is dependenct on that value should work.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: