Quantcast
Channel: 一言多いプログラマーの独り言
Viewing all articles
Browse latest Browse all 846

django2.0で、DisallowedHost Invalid HTTP_HOST header:'IP:8000'. You may need to add 'IP' to ALLOWED_HOSTS.

$
0
0
django2.0を立ち上げると、


DisallowedHost Invalid HTTP_HOST header:'IP:8000'. You may need to add 'IP' to ALLOWED_HOSTS.
といきなりつまずく。セキュリティーがしっかりしてますね(汗)。

settings.pyの「ALLOWED_HOSTS」を変更

ALLOWED_HOSTS = []

ALLOWED_HOSTS = ['*']
django2.0は、スタート画面がカッコイイ!



参考サイト
Django ALLOWED_HOSTSの設定(ンジニア足立のコーディング日記さん)
Django 1.10 でサーバーを起動すると DisallowedHost になる(New-Villageさん)

Viewing all articles
Browse latest Browse all 846

Trending Articles