You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Still, note that there are always going to be sections of your debug output that are inappropriate for public consumption. File paths, configuration options and the like all give attackers extra information about your server.
It is also important to remember that when running with DEBUG turned on, Django will remember every SQL query it executes. This is useful when you’re debugging, but it’ll rapidly consume memory on a production server.
Finally, if DEBUG is False, you also need to properly set the ALLOWED_HOSTS setting. Failing to do so will result in all requests being returned as “Bad Request (400)”.
Braincoke
changed the title
Bad request - Error 400 when using macvlan
Bad request - Error 400
May 27, 2020
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Here is an error I encountered with its solution.
Expected Behavior
When using the docker-compose.yml file below and starting it with
docker-compose up
the application should work.Current Behavior
The docker seems to start properly without yielding errors but trying to access the application returns 400 errors.
This is usually a sign that "ALLOWED_HOSTS" is not properly configured but I did include the environment variable in the docker-compose file.
Solution
The mounted volume
/config
contains a filelocal_settings.py
that seems to take precedence over the environment variables :The solution is to modify the parameters directly in this file. Hope this saves some time for someone else.
The text was updated successfully, but these errors were encountered: