I am back with THE SOLUTION (for me, anyway):
I needed to add the proxy to a variable called MM_SERVICESETTINGS_ALLOWEDUNTRUSTEDINTERNALCONNECTIONS
in the environment:
mattermost['env'] = {"http_proxy" => "http://proxy.company.com:80",
"https_proxy" => "http://proxy.company.com:80",
"no_proxy" => "localhost,127.0.0.1,.company.com"
"MM_SERVICESETTINGS_ALLOWEDUNTRUSTEDINTERNALCONNECTIONS" => "localhost 127.0.0.1 proxy.company.com"}
If you just run Mattermost without Gitlab, the equivalent variable is AllowedUntrustedInternalConnections
in config.json. If you are using the bundled version you CANNOT use that config file - Gitlab will override it with the environment variable always, because it makes sure it includes at least localhost.