Currently, the angular code uses the ui config block for two purposes: One, to decide what IP address/port to bind to, and two, to decide what the baseUrl is for constructing various urls.
This is problematic in scenarios where there needs to be a difference. For example, where nginx is configured to do ssl termination and proxy requests through to node.
There should be a way to have different values for these, so we can continue to bind to internal port 3000 internally while proxying through an upstream web server, for whatever reason.
One possible way would be to have an explicit (optional) .baseUrl configuration value respected in the .ui block. This would require a slight change to src/config.js to respect such value (instead of overwriting it with a constructed value) if it's present.
Another way would be to somehow set this using the downstream rest /server (root) endpoint's dspaceURL value. This approach would have the advantage of only requiring configuration of the external ui url one place.
Currently, the angular code uses the
uiconfig block for two purposes: One, to decide what IP address/port to bind to, and two, to decide what the baseUrl is for constructing various urls.This is problematic in scenarios where there needs to be a difference. For example, where nginx is configured to do ssl termination and proxy requests through to node.
There should be a way to have different values for these, so we can continue to bind to internal port 3000 internally while proxying through an upstream web server, for whatever reason.
One possible way would be to have an explicit (optional) .baseUrl configuration value respected in the .ui block. This would require a slight change to src/config.js to respect such value (instead of overwriting it with a constructed value) if it's present.
Another way would be to somehow set this using the downstream rest /server (root) endpoint's
dspaceURLvalue. This approach would have the advantage of only requiring configuration of the external ui url one place.