In default the communication between the communication between the simulation containers and backend (via API requests) is not possible. As a quick fix for testing, I added the container name of my testing container to the ALLOWED_HOSTS parameter in the Django orom_backend/settings.py file. This has to be fixed and adapted for all simulation containers.
[ ] Research about possible solutions for dynamic hosts (wildcard * gave me an error)
[ ] Test if it is possible to set ALLOWED_HOST as environment variable and append container name on container start
🚀 Proposed Solution
One solution as ChatGPT and Django documentation mentions, is to implement a Middleware that checks the host/domain name. Current container naming-convention is: sim_mujoco_USER-ID_SCENE-ID. We should implement at least a check if the user_id and scene_id exist when accepting requests from a host (security reasons)
✨ Feature Overview
In default the communication between the communication between the simulation containers and backend (via API requests) is not possible. As a quick fix for testing, I added the container name of my testing container to the ALLOWED_HOSTS parameter in the Django orom_backend/settings.py file. This has to be fixed and adapted for all simulation containers.
📝 Open Tasks
🚀 Proposed Solution
One solution as ChatGPT and Django documentation mentions, is to implement a Middleware that checks the host/domain name. Current container naming-convention is: sim_mujoco_USER-ID_SCENE-ID. We should implement at least a check if the user_id and scene_id exist when accepting requests from a host (security reasons)