Troubleshoot Mattermost error: "The signup link does not appear to be valid"

I have put mattermost behind an apache reverse proxy, all is working apart from the invite link always results in

Mattermost needs your help:
The signup link does not appear to be valid

If I connect to the backend directly using port 8065 the created link works, I cant see what is being changed via the proxy?

Seems it sends the activation link as http regardless if it was https - the mod proxy messes with the link.

ive added

Redirect permanent / https://chat.somedomain.com/

to the config for http traffic to redirect to https and this works ok.

Thanks @megatronic79, appreciate the update, very glad you’re up and running!

This is still broken, 3.5 years later. Are there plans for Mattermost to fix this? Pulling up the invitation link from the team web interface shows https, so clearly the system knows that its address should be https.