Avatar using http when https is terminated in front using reverse proxy

If you are using a reverse proxy to terminate ssl in front of gitlab the gitlab avatars(not gravatar) use http:// links instead of relative or https://.

I have followed http://doc.gitlab.com/omnibus/settings/nginx.html#supporting-proxied-ssl and this still happens.