Invalid HTTP_HOST header in Docker Local
See original GitHub issueI tried deploying cookie cutter app using Docker locally.
At this step of running
docker-compose -f dev.yml
Everything is fine, but when accessing http://dockerbox:8000, I got following error
django.core.exceptions.DisallowedHost: Invalid HTTP_HOST header: 'dockerdev:8000'. You may need to add 'dockerdev' to ALLOWED_HOSTS.
I already set dockerdev in local.py ALLOWED_HOSTS=‘.dockerdev’ *dockerdev: is my docker machine box set in /etc/hosts
Any help?
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Invalid HTTP_HOST header in Docker Local #879 - GitHub
I tried deploying cookie cutter app using Docker locally. ... django.core.exceptions.DisallowedHost: Invalid HTTP_HOST header: 'dockerdev:8000'.
Read more >Invalid HTTP_HOST header: 'products_web:8001& ...
The warning is to tell you that underscore (_) is not valid in a hostname. The most common place you see underscores in...
Read more >DisallowedHost at /, Invalid HTTP HOST header in Django ...
Solution/Fix: Disallowed Host at /address, Invalid HTTP HOST header in Python Django Docker Google Cloud Run App Allowed_Hosts Issue.
Read more >What is this “Invalid Host Header” error? | by Avinash Thakur
This error is most commonly caused by a misconfiguration of the application server that causes it to reject non-local connections.
Read more >Configuring a registry - Docker Documentation
The url to access the metrics is HOST:PORT/path , where HOST:PORT is defined in addr under debug . headers. The headers option is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Inside the settings.py file: ALLOWED_HOSTS = [‘192.168.99.100’]
@daniel374 is referring to the docker machine that one starts up as
default
. It would be started up as on the CLI: