In my django app I need to specify a list of allowed hosts through a configuration variable. The render docs suggest using the RENDER_EXTERNAL_HOSTNAME env variable to drive this. I am seeing that once switching this variable from “*” to a specific host, the health checks on deploys begin to fail, and I’m assuming that’s due to the host making the health check not being on the allowlist.
This is what I currently have to configure my allowed_hosts - what additional domain should I add for the health checks to pass?
ALLOWED_HOSTS = ["0.0.0.0", "127.0.0.1"] + env("ALLOWED_HOSTS").split("|")
RENDER_EXTERNAL_HOSTNAME = env("RENDER_EXTERNAL_HOSTNAME", default=False)
if RENDER_EXTERNAL_HOSTNAME:
ALLOWED_HOSTS.append(RENDER_EXTERNAL_HOSTNAME)