UCS web interface behind reverse proxy

I have a clean installation of UCS 5.0-4. The web interface is working when I use the IP-address in the URL, but when I hit the web interface with the DNS name of the reverse proxy, I get redirected to a URL with localhost as the base.

I’m accessing the web interface with HTTPS, so I don’t think this is caused by a HTTP to HTTPS redirect. And when I replace localhost with the DNS-name of the reverse proxy, it seems to work fine.

Is there a way to disable this redirect or to get around this?