Content
Why does openproject use home_url instead of home_path?
Added by Thiago Presa over 8 years ago
Reading the openproject source code I noticed that the use of home_url is ubiquitous. I stumbled upon a side-effect of this when trying to run a docker-based instance of openproject behind an apache proxy. I don’t know for sure, but it seems to me that the hostname is extracted from the HTTP request, which in this case is placed by the apache proxy targeting the docker instance. The hosname presented to the user is that of the docker instance, which the user’s browser has no direct access. Hence plenty of XHR requests target this docker instance instead of the visible hostname and fail.
Switching to home_path would fix this, and I think would generally be a more robust solution, but I’m under the impression that this decision was deliberate. So, why is openproject using home_url instead of home_path so ubiquitously?