I'm running my Django app in a Docker container with nginx as the webserver, and uWSGI as the app server. Everything is deployed on AWS Elastic Beanstalk. When I set DEBUG=False
, all the requests result in Bad Request (400)
. I have tried both ALLOWED_HOSTS='*'
and ALLOWED_HOSTS=['*']
, and I still get the same error. I verified the request is coming to uWSGI by checking the logs. The uWSGI logs have this:
[pid: 33|app: 0|req: 4/4] 172.17.0.1 () {46 vars in 855 bytes} [Tue Aug 1 02:54:17 2017] GET / => generated 26 bytes in 26 msecs (HTTP/1.1 400) 1 headers in 53 bytes (1 switches on core 0)
I've tried a bunch of answers, but no luck. I've tried this answer, but I still get the same error. Is there anything else that could cause this?
This question is different from this question, because, as I mentioned, setting ALLOWED_HOSTS
to wildcard did not work for me. From the same question, I also tried this answer, and I still get the same error.