Gitlab_Mattermost setup unable to redirect http to https

I found another topic with the same problem:

And I found an older GitHub Issue which suggests that this could be caused by a misbehaving proxy (i.e. sending the X-Forwarded-Proto header with a wrong value).

You said that you have Mattermost and Gitlab installed on two different servers using the omnibus installation. Can you describe your setup a little bit more, please? On server 1, where Mattermost is running, has this been installed using the Mattermost omnibus installation? If so, can you please share the contents of the files /etc/mattermost/mmomni.yml, /etc/mattermost/mmomni.mattermost.env and /etc/nginx/conf.d/mattermost.conf?

Make sure to remove passwords and other sensitive information from these files, please.