Well, with reverse proxy it never gets it. It gets proxy headers. And if those headers will set up by that proxy Discourse never knows traffic is coming thru port 80. And that is one point and job of reverse proxy, terminating SSL. Am I wrong?
Sure. But Discourse is totally happy if it goes to user’s *nix account under system and never leaves VPS itself as long mail deliver gives right answer. Am I wrong?