[Bug Fix] Allow non-localhost hosts in docs development env
Merged
DJ
5mo ago+3+3+0123456789-0-0-0123456789
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.hostsindocs/config/environments/development.rb— development-only, does not affect production.
Test plan
- Ran
bin/rails server -b 0.0.0.0 -p 3000inside the docs devcontainer - Confirmed a request with
Host: devmachine.cloud:3001returns 200 (previously blocked) - Confirmed
localhoststill 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.