Gitlab Self-hosted Application Redirect URI

Hi all!

I have been given access to a gitlab self-hosted instance of a team, that is hidden behind a VPN. In order to setup my work, I have created a proxy server (which is deployed in a VM that is connected to the VPN) which redirects all my requests to the gitlab api. At the same time, I have created a Gitlab Application for OAuth2 authorization, which I have already tested and used in gitlab.com and in other gitlab instances that are not behind a VPN. However, when the gitlab instance is behind the VPN, the redirect URI does not work and, after logging in with my gitlab credentials, it redirects me to the gitlab home page, instead of my custom application.