Public links are in HTTP instead of HTTPS
Public link should be : [https]://my.public.link
public link is : [http]://my.public.link.
I don't know where is the code involved in this but I saw a discussion about public links that said there was created with request Header (https://github.com/mattermost/mattermost-server/issues/8739#issuecomment-387451051)
so I configured Mattermost to work with TLS in system console and "voilà" ! public links are now created with "HTTPS" before hostname and domain name.
@Pafzedog What Mattermost server version are you on?
@amyblais Version: 5.21.0
Hi @Pafzedog, as you have accurately pointed out, we construct the URL from the Host header as it is more robust in situations where Mattermost is deployed behind a proxy.
Are you sure your reverse proxy is setting the X-Forwarded-Proto to https correctly ?
Hi @agnivade , you are propably right, I'm actually forced to use Apache in place of Nginx for the proxy thing and I think this directive is missing in the unofficial documentation here
something like :
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS}
with mod_headers enabled
I believe that's right @Pafzedog. Would you be open to send a PR to rectify that ?
Hi @agnivade , for now I can't test it because server is in prod but I'll try to get it working this week-end.
depending on the result, I'll do a PR.
@agnivade I tested it with success and I made the PR
@agnivade I made the PR at the good place ;)
Closing this one after merging your PR, thanks again @Pafzedog!