Closed kaibutsu closed 5 years ago
Thanks for the compliments.
The issue described is something we need to think about. My first impression is being a little unsure about how I could contribute to fix the problem. The ALLOWED_HOSTS
setting is a part of Django and serving security matters. As it would not be a good idea to remove it or use a wildcard to allow everything, we might need to think about what to add to the list to make the setup a little easier. Basically there are two options which unfortunately immediately lead to two problems which boil down to the question what to add to the list.
The best idea I have at the moment is to write a remark into the readme.md
that the local.py
needs to be adjusted to the specific needs. I suppose my misjudgement was taking this for being clear because it is mentioned in the RDMO documentation.
Or do you have any better idea?
I decided to move the ALLOWED_HOSTS
setting into the variables.env
to raise awareness that there is something the needs to be adjusted. Therefore I consider this ticket being ready to be closed.
When trying to deploy RDMO in our environment we weren't able to access our Docker host via URL as the hostname was not made available to the DNS so we tried to access it via IP address. This led to HTTP 400 errors (Bad Request) as the IP was not listed under ALLOWED_HOSTS in template_local.py: https://github.com/rdmorganiser/rdmo-docker-compose/blob/d10b73ae999e7242b8ef954d9ca81cf8d38616d4/rdmo/rootfs/tmp/template_local.py#L22 The same error occurs if the Docker host's hostname differs from "rdmo".