Resolve org-by-domain with a deepest-label alias fallback

Fixkamo-shared-library
Shipped
July 6, 2026 at 8:37 PM UTC
Author
Kamo
Commit
41255c5

Add **************** exact domain match, then drop the deepest label once (register.optionone.com -> optionone.com) so a per-org register/branding subdomain resolves to its owning org even when only the apex is a registered OrgDomain. Fails closed (empty) on a blank/unknown host — it never resolves to a default/platform org. This is the resolver behind the fix for self-registrations on register.<org>.com being filed under kamocrm instead of <org>.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing