[Bug Fix] Allow non-localhost hosts in docs development env

Merged
DJ
5mo ago
+3-0

Summary

  • Rails 8's Host Authorization middleware only allows localhost/private IPs by default, so opening the docs dev server through a VM hostname or Tailscale domain gets rejected with "Blocked hosts".
  • Clears config.hosts in docs/config/environments/development.rb — development-only, does not affect production.

Test plan

  • Ran bin/rails server -b 0.0.0.0 -p 3000 inside the docs devcontainer
  • Confirmed a request with Host: devmachine.cloud:3001 returns 200 (previously blocked)
  • Confirmed localhost still works as before

Summary by cubic

Fix docs dev server host blocking by clearing config.hosts in development. This allows access via VM hostnames, tunnels, or Tailscale domains (not just localhost) and has no production impact.