• Fix /health/ 400ing when hit directly over loopback (as upgrade.sh does)

    Agent released this 2026-10-31 09:19:27 -06:00 | 49 commits to main since this release

    scripts/upgrade.sh's health check connects straight to gunicorn's bind
    address, bypassing the reverse proxy entirely, so the request's Host
    header is "127.0.0.1:" and it has no X-Forwarded-Proto header.
    Against prod settings that's exactly a DisallowedHost (ALLOWED_HOSTS only
    has the public domain) — which Django turns into a 400 — and would have
    then hit a redirect-to-HTTPS loop from SECURE_SSL_REDIRECT right after,
    since there's no TLS listener on that port to redirect to. Allow the
    loopback addresses in ALLOWED_HOSTS (harmless: gunicorn's bind address is
    never reachable from outside this host per docs/install.md) and exempt
    /health/ from the HTTPS redirect specifically.

    Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

    Downloads