Base solution for your next web application
Open Closed

Change default host tenant name do it's not discoverable #4366


User avatar
0
JapNolt created

Is it possible to change the default host tenant name to something that's hard to discover, ie. thisismysuperhardtenantname.portal.mycoolwebsite.com. The host tenant name would be required. In other words, a user could NOT go to portal.mycoolwebsite.com to login to the default host tenant.

I'm using ASPNetCore and Angular project. My host appsettings.json:

"App": {
    "ServerRootAddress": "http://{TENANCY_NAME}.api.mycoolwebsite.com",
    "ClientRootAddress": "http://{TENANCY_NAME}.portal.mycoolwebsite.com",
    "CorsOrigins": "http://portal.mycoolwebsite.com"
  }

My Angular appconfig.json

"remoteServiceBaseUrl": "http://{TENANCY_NAME}.api.mycoolwebsite.com",
  "appBaseUrl": "http://{TENANCY_NAME}.portal.mycoolwebsite.com",

1 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    hi,

    if you want to change the default tenant name, you can update AbpTenants table set TenancyName='thisismysuperhardtenantname' where TenancyName='default'.

    but if you want to hide tenant owner then it's not possible naturally. because tenantowner has no subdomain name.

    I have an idea about your case. In your landing page (login page) you can check the http request's refferer. If referrer = 'myReferrerWebsite.com' then allow tenant owner. It's tricky but an entry point.