/healthz is hit over 127.0.0.1 (the deploy probe) and localhost (the container's own healthcheck) before any proxy has supplied a real Host header. With only the public domain in ALLOWED_HOSTS, Django 400s both, the container is marked unhealthy forever, and the deploy never goes green — which is how the first real deploy failed. The loopback is now appended unconditionally. It widens nothing: gunicorn binds to the loopback only and the proxy owns the public domains, so nothing external can present these hosts. Tested with a non-loopback ALLOWED_HOSTS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
12 KiB
12 KiB