What about this? Since ALLOWED_HOSTS can take a list, specify extra hosts using comma separation.

ALLOWED_HOSTS = environ.get('ALLOWED_HOSTS', '*').split(',')