RFC: Stop attempting to allow running foreman under a sub-folder in 3.0

Hello,

In the past, we had some code in place to allow running foreman under a subfolder, for example https://example.com/foreman/ (instead of e.g. https://foreman.example.com).
However, that ability has been mostly broken for a long time due to many places in our react code that assume Foreman is running under the root URL (see for example Fixes #29893 - using properly prefixed URL in React by ezr-ondrej · Pull Request #7674 · theforeman/foreman · GitHub which tried to fix some cases).
Additionally, we generally require that Foreman runs on its own host with no other applications on it, so running in a subfolder doesn’t make much sense.
Some people suggested this might be useful for running a small POC, however I believe that forklift provides a much better experience for that and does not rely on a subpath mount.
In the 2-3 years that this ability has been broken, I have not seen any user complaining about issues caused by this, suggesting that this feature is not actually used at all.

Therefor, I propose to drop these attempts completely in Foreman 3.0 and officially consider this an unsupported setup. This will allow simplifying a lot of code around URL handling across the application.
Specifically, the main change from the developer standpoint in 3.0 will be marking the js foremanUrl will be marked as deprecated and return the same path it receives and will no longer be required.

If you object and believe this is something that we should invest in fixing, please also suggest how to achieve it and who will be able to undertake that effort.

3 Likes

:+1:

I’ve opened a POC PR showing the code simplifications in core:

:+1: I agree if its broken, lets clean things up and if we wanted this in the future approach it from a fresh perspective.

+1