feat: add landscaping-assistant.app to Rails config.hosts (#224) #230
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "224-add-custom-domain-host"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
landscaping-assistant.apptoconfig.hostsin production.rb so Rails accepts requests arriving through the Hetzner edge proxy with the public domain Host header.Changes
config/environments/production.rb: addedconfig.hosts << "landscaping-assistant.app"following the same pattern used in development.rb for the Tailscale hostnameTest Plan
curl -I https://landscaping-assistant.appreturns 200 (not 403 Blocked Host)curl -I https://landscaping-assistant.tail5b443a.ts.netReview Checklist
Related Notes
ldraney/pal-e-servicesfor Keycloak redirect URIsPR #230 Review
DOMAIN REVIEW
Stack: Ruby on Rails (production config)
The change adds
config.hosts << "landscaping-assistant.app"toconfig/environments/production.rb. This is the standard Rails 7+ host authorization mechanism for allowing requests with a specificHostheader.Correctness:
<<append syntax is correct. It adds to the default hosts allowlist rather than replacing it, so existing access via Tailscale hostname is preserved.config.hosts << "landscaping-dev.tail5b443a.ts.net"indevelopment.rb(line 76), consistent with the PR description.Security:
config.hostsis a defensive mechanism -- adding a domain relaxes the allowlist. This is intentional and necessary for the Hetzner edge proxy to forward requests with the public domain Host header.One consideration (not a blocker): Only the bare domain
landscaping-assistant.appis added. If traffic ever arrives withwww.landscaping-assistant.appas the Host header, Rails will return 403 Blocked Host. This is likely fine since DNS and Caddy are presumably configured for the bare domain only, but worth noting for future awareness.BLOCKERS
None.
This is infrastructure config plumbing, not application logic. No test coverage blocker applies -- the test plan correctly specifies post-deploy manual verification via
curl -I. No secrets, no user input, no auth logic, no DRY concerns.NITS
# Public domain via Hetzner edge proxy) for future readers who encounter the file cold. The commented-out example block above does not explain why a host is allowed. Minor -- the git log serves this purpose too.SOP COMPLIANCE
PROCESS OBSERVATIONS
VERDICT: APPROVED
PR #230 Review
DOMAIN REVIEW
Stack: Ruby on Rails (production environment configuration)
Rails Host Authorization Analysis:
"landscaping-assistant.app"toconfig.hostsin production.rb, which tells Rails to accept requests with that Host header arriving through the Hetzner edge proxy. This is the correct fix for the 403 Blocked Host error.<<(append) rather than assignment, which preserves the default host list (including the Tailscale hostname). This matches the pattern already established indevelopment.rbline 76:config.hosts << "landscaping-dev.tail5b443a.ts.net".config.hostsexample block, with clean blank-line spacing.test.rbalready callsconfig.hosts.clear, so existing specs are unaffected.One consideration (non-blocking): No
www.landscaping-assistant.appvariant is included. This is fine if DNS/Caddy does not routewwwto this app, but worth confirming during the deployment test plan.BLOCKERS
None.
NITS
None. The change is minimal, correctly scoped, and follows established patterns.
SOP COMPLIANCE
PROCESS OBSERVATIONS
ldraney/pal-e-servicesfor Keycloak redirect URIs -- good cross-repo coordination.VERDICT: APPROVED