Today Web UI is configured to use the default repository ootb. This configuration is done when defining the shared <nuxeo-connection> in our index page.
This means that by changing the index page we can make Web UI work with any other repository.
Still in order to Web UI working with multiple repositories, we need a way to make this configuration dynamic and we need it to be reflected in the URL.
With the work done on
NXP-25040 we have Tomcat's rewrite valve enabled by default so it should be possible to have the repository name in the URL injected into the index page and used in the connection.
For instance, a rewrite rule like RewriteRule ^/repo/(.)/ui/(.) /ui/$2 [E=NXREPO:$1] would make the repository available as a NXREPO request attribute.
The <nuxeo-app> baseUrl also needs to be properly set to ensure the `/repo/<repo>` prefix is kept in links.