MCPcopy Index your code
hub / github.com/learnhouse/learnhouse / hostIsCustomDomain

Function hostIsCustomDomain

apps/web/proxy.ts:103–111  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

101 * (used by the `/redirect_from_auth` handler). Always false in `single`.
102 */
103async 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

Callers 1

proxyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected