Hi, we are using AbpZero 8.7 with Angular and .net core. We would like to prevent public access to the host. We tried to use CustomDomainTenantResolveContributor (registered in Web.Core PreInitialize method) without any significant change. (following this Tenant-URL-Resolution)
Is there any possibility how to change behaviour, when someone access non-existing tenant to not redirect to the host but to the sign-up page?
Thanks.
2 Answer(s)
-
0
forgot to mention that we use tenant subdomains....
-
0
Hi,
Creating a customn tenant resolver should work in this case. You can create a custom resolver derived from https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.AspNetCore/AspNetCore/MultiTenancy/DomainTenantResolveContributor.cs. But, instead of returning null, you can throw an exception when the tenant is not found and handle it on the clietn side to redirect user to register page.