Question : allowed_hosts error ecs django
Answered by : john-dollosa
from socket import gethostname, gethostbyname, gethostbyname_ex
ALLOWED_HOSTS = [ gethostname(), ] + list(set(gethostbyname_ex(gethostname())[2]))
Source : https://stackoverflow.com/questions/37031749/django-allowed-hosts-ips-range | Last Update : Tue, 12 Apr 22