GitLab 12.0.9 not allowing auth when Git URL was redirected

GitLab 12.0.9-ee (using this as CE)
Issue: GitLab denies authentication with a git config uses a URL that was redirect.
Background: The GL server was originally accessible at http://oldgitlab.com, and now that has changed to http://newgitlab.com. In order to also redirect users, I added a custom redirect (/etc/nginx/conf.d/redirect.conf) to redirect the old hostname to the new hostname. In the Web UI, this works without error. When a user who has a clone repo attempts any git commands, such as git pull, the git client will correctly redirect from oldgitlab.com to newgitlab.com, however, the GL server denies the authentication (as seen in the logs) due to the redirect.

Now, I didn’t experience this problem in a newer version (I’m also using 12.2.4 for testing), so I assume this was fixed. The GL instance experiencing the issue is located in an air-gapped environment without the ability to upgrade. I can, however, hand-apply the necessary change.

Thanks in advance!