Java AdminConnection doesn't work with Stardog behind a reverse proxy

We have Stardog running inside a k8s cluster and behind a nginx reverse proxy

If we use raw HTTP connections in python or Java we can access the admin functions like list databases for example.

However if we use the stardog java library to create an admin connection and list the databases (or anything else) it fails because it strips the path component when constructing the HttpAdminClientImpl.

For example our connection string is https://k8s.hostname.com:5820/stardog which it should add 'admin/databases' to, instead it extracts the scheme (https), the host(k8s.hostname.com), the port (5820) and uses them to construct a new URL https://k8s.hostname.com:5820/admin/databases instead of https://k8s.hostname.com:5820/stardog/admin/databases

As a work-around we've implemented another rewrite rule in the reverse proxy that forwards /admin/* to the stardog pod in the same way we forward /stardog prefixed paths to the stardog pod except we don;t need to remove the stardog path