Allowed Hosts Error Ecs Django

[Solved] Allowed Hosts Error Ecs Django | Python Frameworks Django - Code Explorer | www.yomemimo.com
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

Answers related to allowed hosts error ecs django

Code Explorer Popular Question For Python Frameworks Django