Skip to content

Make generated URLs domain-agnostic - #5722

Open
awwaiid wants to merge 1 commit into
mainfrom
domain-agnostic-urls
Open

Make generated URLs domain-agnostic#5722
awwaiid wants to merge 1 commit into
mainfrom
domain-agnostic-urls

Conversation

@awwaiid

@awwaiid awwaiid commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

There have been several reports about humanessentials.app getting blocked by network-local dns filters. I haven't been able to track down what list we are on or what. But in the meantime I got humanessentialsapp.com and humanessentialsapp.org and pointed them at our domain.

This works in general, but there are several hard-coded places that refer to humanessentials.app . This PR genericizes a bunch of them.

Email is one of the places that is done async and so can't follow the user's browser, so I'm leaving that for now.

Human Essentials is adding humanessentialsapp.com and humanessentialsapp.org
alongside humanessentials.app, because some networks block the `.app` TLD.
Links rendered during a request already follow the host the visitor arrived on
(the request host takes precedence over routes.default_url_options), but a
number of hard-coded absolute URLs sent people back to humanessentials.app
regardless, which defeats the point for anyone on a blocking network.

- Replace hard-coded in-app links with route helpers, so they follow the
  current domain: the partner sign-in link on the account request form, and the
  ICS event URL in CalendarService (which also pointed at a stale
  /diaper_bank/... path that no longer exists).
- Replace hard-coded links in mailer bodies with root_url, and fix the password
  reset logo to resolve against the new action_mailer.asset_host rather than an
  absolute humanessentials.app URL that breaks on blocking networks.
- Drive the production/staging host from APP_HOST (defaults unchanged), and
  split the SMTP HELO domain out to SMTP_DOMAIN since it tracks where mail is
  sent from rather than which domain the site is browsed on.
- Add SiteUrlsHelper + config.x.site_urls for the few places that deliberately
  link to a *different* deployment (the staging banner pointing at the live
  site, the demo credentials in the account request email), configurable via
  PRODUCTION_URL and DEMO_URL.

Note that email links still use a single configured host, since a mailer has no
request to derive one from.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ty2xAxuiBVRpCLoHaR62EU
@awwaiid
awwaiid requested a review from dorner September 13, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant