Some redirects don't take url-prefix into account

In config.yml I have system.url-prefix: "https://sentry.sitename.net", but it doesn’t seem to be working.

I’m trying to set it so that I can go to https://sentry.sitename.net but when I go to the url I get redirected to https://sitename.net/auth/login which is then picked up by my default web server backend. I can manually go to https://sentry.sitename.net/auth/login/sentry/ and log in. Once I’m within the app most everything seems to work as intended.

If I go to https://sentry.sitename.net I get redirected to https://sitename.net/sentry/ rather than https//sentry.sitename.net/sentry/.

Using the CLI, I have confirmed that the settings within the docker image are set correctly.

I’m using haproxy to handing the routing. The related settings are:

acl host_sentry hdr_beg(host) -i sentry
use_backend sentry if host_sentry
backend sentry
        mode     http
        balance  roundrobin
        option   forwardfor
        server   server1 localhost:9000 weight 1 maxconn 100