* In `multi` tenancy, ask the EE module whether this Host is a custom domain * (used by the `/redirect_from_auth` handler). Always false in `single`.
(host: string | null, instance: InstanceInfo)
| 101 | * (used by the `/redirect_from_auth` handler). Always false in `single`. |
| 102 | */ |
| 103 | async function hostIsCustomDomain(host: string | null, instance: InstanceInfo): Promise<boolean> { |
| 104 | if (instance.tenancy === 'single' || !host) return false |
| 105 | try { |
| 106 | const mod = await import('./ee/services/tenancy/resolveMulti.middleware') |
| 107 | return mod.isCustomDomain(host, instance.frontend_domain) |
| 108 | } catch { |
| 109 | return false |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * Detect the admin subdomain (multi tenancy only). In single mode there is no |