Bind puma to 0.0.0.0 and allow Tailscale host #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/tunnel-compatibility"
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
0.0.0.0instead of127.0.0.1so the cluster tunnel can reach it*.tail5b443a.ts.netin Rails host authorizationChanges
config/puma.rb--portreplaced withbind "tcp://0.0.0.0:..."config/environments/development.rb-- added.tail5b443a.ts.netto allowed hostsTest Plan
ss -tlnp | grep 3137shows0.0.0.0curl https://mdview.tail5b443a.ts.net/returns 200Review Checklist
Related Notes
ldraney/mdview #5— the Forgejo issue this PR implementsCloses #5
PR #6 Review
DOMAIN REVIEW
Stack: Ruby on Rails, Puma (application server config). Two config files changed, 3 additions / 1 deletion. Minimal, focused diff.
config/puma.rb-- bind address changeThe change from
port ENV.fetch("PORT", 3137)tobind "tcp://0.0.0.0:#{ENV.fetch("PORT", 3137)}"is correct Puma DSL.portbinds to0.0.0.0by default in some Puma versions but the explicitbindform is more reliable and makes the intent (listen on all interfaces) unambiguous. String interpolation withENV.fetchand a default value is the standard pattern. No issues.config/environments/development.rb-- host authorizationconfig.hosts << ".tail5b443a.ts.net"-- the leading dot is Rails convention for wildcard subdomain matching, allowing any*.tail5b443a.ts.nethostname. This is correctly scoped todevelopment.rbonly, so production host authorization is unaffected. The tailnet domaintail5b443ais a Tailscale MagicDNS identifier, not a secret (it is not resolvable outside the tailnet).Comment on the stale comment in puma.rb (line 31): The inline comment still reads
# Specifies the 'port' that Puma will listen on...but the directive is nowbind, notport. This is cosmetic, not blocking.BLOCKERS
None.
This is a two-line infrastructure config change. No new application functionality is introduced, no user input is handled, no auth paths are modified, and no secrets are present. The BLOCKER criteria (test coverage for new functionality, unvalidated user input, secrets in code, DRY violations in auth paths) do not apply to this change.
NITS
config/puma.rbline 31): The comment# Specifies the 'port' that Puma will listen on to receive requests; default is 3000.should be updated to reflect thebinddirective and the actual default port 3137. Low priority.SOP COMPLIANCE
fix/tunnel-compatibility. SOP expects{issue-number}-{kebab-case-purpose}(e.g.,5-tunnel-compatibility). Thefix/prefix convention diverges from the standard. Non-blocking for this repo given no enforced branch policy was found, but noted.PROCESS OBSERVATIONS
ss -tlnp,curl) which is appropriate for infrastructure binding changes that are not unit-testable in the traditional sense.VERDICT: APPROVED