Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

ALLOWED_HOSTS can't be blank #26

Open
eugenehiggins opened this issue Nov 2, 2021 · 0 comments
Open

ALLOWED_HOSTS can't be blank #26

eugenehiggins opened this issue Nov 2, 2021 · 0 comments

Comments

@eugenehiggins
Copy link

In step 2.4 you say to run the devserver which gives an error:

Invalid HTTP_HOST header: 'api.local.test:8000'. You may need to add 'api.local.test' to ALLOWED_HOSTS.
Bad Request: /
[02/Nov/2021 16:10:32] "GET / HTTP/1.1" 400 71270
Invalid HTTP_HOST header: 'api.local.test:8000'. You may need to add 'api.local.test' to ALLOWED_HOSTS.

ALLOWED_HOSTS in settings.py needs to be edited to something like

ALLOWED_HOSTS = ['api.local.test', 'localhost', '127.0.0.1']

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant