Base solution for your next web application
Open Closed

How to support domain per tenant #10564


User avatar
0
sebaxf created

Hello I'm running aspnetzerop v10.4.0 and we are reviewing our deployment process.

We want to have differents domains per tenants

our goal is to have the following scenario.

www.domainone.com > points to tenant1.

www.domaintwo.com ~ points to tenant2.

How we can do that ?


1 Answer(s)
  • User Avatar
    0
    musa.demir created

    Hi @sebaxf

    You should change places that resolves tenant from url. Here are the places https://github.com/aspnetzero/aspnet-zero-core/blob/39f9c6ab314eb56580e33205c426cfb11f618519/angular/src/shared/common/nav/app-url.service.ts#L39-L44

    Then you should also change the tenancy resolver in server side. Here is where aspnetboilerplate resolves tenant: https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.AspNetCore/AspNetCore/MultiTenancy/DomainTenantResolveContributor.cs You can please create your own implementation that inherits ITenantResolveContributor and implement it as seen below.

                Configuration.MultiTenancy.Resolvers.Add<MyCustomTenantResolveContributor>();