Resolve org subdomains under the community-foundations apex#32
Merged
Conversation
Production fell back to Rails' default tld_length = 1, so it treated rowhomelabs.com as the domain and mis-parsed every request: the apex became request.subdomain "community-foundations" (404 instead of the landing page) and "arlington.community-foundations.rowhomelabs.com" became "arlington.community-foundations" (no matching org). Set tld_length = 2 so the apex is the domain and org subdomains resolve correctly, enable config.hosts for the apex plus org subdomains (with a /up health-check exclusion), and list each org host in the kamal proxy so it issues a per-host Let's Encrypt cert. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Production used Rails' default
tld_length = 1, so it treatedrowhomelabs.comas the domain and mis-parsed every request — the apex resolvedrequest.subdomainto"community-foundations"(404 instead of the landing page) andarlington.community-foundations.rowhomelabs.comto"arlington.community-foundations"(no matching org). This setstld_length = 2so the apex is the domain and org subdomains resolve to the rightOrganization. It also enablesconfig.hostsfor the apex plus org subdomains (excluding the/uphealth check) and lists each org host in the kamal proxy so it issues a per-host Let's Encrypt cert.Deploying requires DNS for the org host(s) pointing at the server and a proxy reboot so the certs are issued.
🤖 Generated with Claude Code