R
Railway8mo ago
Nahasco

Django Allowed Hosts Error "Invalid HTTP_HOST header: '0.0.0.0:8000'"

I am getting this error sent to my admin email from the application I deployed on railway.app
Invalid HTTP_HOST header: '0.0.0.0:8000'. You may need to add '0.0.0.0' to ALLOWED_HOSTS
Invalid HTTP_HOST header: '0.0.0.0:8000'. You may need to add '0.0.0.0' to ALLOWED_HOSTS
and
Invalid HTTP_HOST header: '35.197.110.103:7010'. You may need to add '35.197.110.103' to ALLOWED_HOSTS
Invalid HTTP_HOST header: '35.197.110.103:7010'. You may need to add '35.197.110.103' to ALLOWED_HOSTS
The application works fine with no issues but I randomly get these errors sent to the admin email. Do I add these to addresses to my allowed hosts? Are these the addresses associated with my railway project?
7 Replies
Percy
Percy8mo ago
Project ID: 643c9962-5fa0-449c-82e0-67b30f66c552
Nahasco
NahascoOP8mo ago
643c9962-5fa0-449c-82e0-67b30f66c552
Brody
Brody8mo ago
you can add these to the allowed hosts
Nahasco
NahascoOP8mo ago
Thanks for the quick response. Can you explain what these or and where are they coming from? Especially the ip address, how would i know that without getting the error?
Brody
Brody8mo ago
the first one is local address and the second one is a gcp ip
Nahasco
NahascoOP8mo ago
I guess the gcp ip is different for different projects or deployments, if thats the case how would I find the gcp ip of my deployment?
Brody
Brody8mo ago
that wouldn't be necessary, ideally you would turn off these kinds of notifications
Want results from more Discord servers?
Add your server