Ask coding questions

← Back to all posts
Can someone help me fix this error
Korbindev

Just run the repl and it shows up with a whole buch of stuff and i want to fix it

Voters
Korbindev
Comments
hotnewtop
Coder100

go to socialnetwork/settings.py, and go to line 25. There you see the ALLOWED_HOSTS array. Set that to ['*']

Korbindev

it comes to a file [email protected]

Coder100

it would be more helpful if you also put the error in the question

Korbindev
Korbindev

but its DisallowedHost at /admin/
Invalid HTTP_HOST header: 'turbulentwelllitcarrier.korbindev.repl.co'. You may need to add 'turbulentwelllitcarrier.korbindev.repl.co' to ALLOWED_HOSTS.
Request Method: GET
Request URL: http://turbulentwelllitcarrier.korbindev.repl.co/admin/
Django Version: 3.2.6
Exception Type: DisallowedHost
Exception Value:
Invalid HTTP_HOST header: 'turbulentwelllitcarrier.korbindev.repl.co'. You may need to add 'turbulentwelllitcarrier.korbindev.repl.co' to ALLOWED_HOSTS.
Exception Location: /opt/virtualenvs/python3/lib/python3.8/site-packages/django/http/request.py, line 149, in get_host
Python Executable: /opt/virtualenvs/python3/bin/python
Python Version: 3.8.10
Python Path:
['/home/runner/TurbulentWelllitCarrier',
'/opt/virtualenvs/python3/lib/python3.8/site-packages',
'/usr/lib/python38.zip',
'/usr/lib/python3.8',
'/usr/lib/python3.8/lib-dynload']
Server time: Sat, 14 Aug 2021 15:47:20 +0000 @Coder100

Coder100
Korbindev