django 报错 DisallowedHost at Invalid HTTP_HOST header: ‘*.com‘. You may need to add ‘*.com‘ to ALL

django 报错解决

DisallowedHost at Invalid HTTP_HOST header: ‘.com’. You may need to add '.com’ to ALLOWED_HOSTS.

报错如下图:

django 报错 DisallowedHost at Invalid HTTP_HOST header: ‘*.com‘. You may need to add ‘*.com‘ to ALL_第1张图片

解决办法

添加信任网址到 setting.py


ALLOWED_HOSTS = ['*.com']

搞定

你可能感兴趣的:(报错解决,django,django,数据库)