OmniAuth redirected to own host instead of providers'

I was trying to enable omniauth for existing users, but the Connect buttons in the Login / Profile page always redirect to my own host instead of the providers’.
i.e.: my host is
https://git.lkho.me, but the buttons redirects the browser to https://git.lkho.me/oauth/authorize?client_id=......&redirect_uri=https%3A%2F%2Fgit.lkho.me%2Fusers%2Fauth%2Fgitlab%2Fcallback&response_type=code&scope=api&state=........
and of course en error page is shown.
However, if I copy the whole thing and just replace the host part to
https://gitlab.com/oauth/authorize?client_id=......&redirect_uri=https%3A%2F%2Fgit.lkho.me%2Fusers%2Fauth%2Fgitlab%2Fcallback&response_type=code&scope=api&state=.....
then everything works fine.

May be it is a reverse proxy problem?

gitlab.rb
external_url 'https://git.lkho.me'
gitlab_rails['trusted_proxies'] = ['172.16.0.0/16']
gitlab_rails['monitoring_whitelist'] = ['127.0.0.0/8', '172.16.0.0/16']
gitlab_rails['omniauth_enabled'] = true
gitlab_rails['omniauth_providers'] = [
  {
    "name" => "gitlab",
    "app_id" => "xxxxxxxxxxx",
    "app_secret" => "xxxxxxxxxxx",
    "args" => { "scope" => "api" }
  },
  {
    "name" => "github",
    "app_id" => "xxxxxxxxxxx",
    "app_secret" => "xxxxxxxxxx",
    "args" => { "scope" => "user:email" }
  },
  {
    "name" => "google_oauth2",
    "app_id" => "xxxxxxxxxxxx",
    "app_secret" => "xxxxxxxxxx",
    "args" => { "access_type" => "offline", "approval_prompt" => '' }
  }
]

nginx['enable'] = true
nginx['listen_addresses'] = ['*', '[::]']
nginx['listen_port'] = 80
nginx['listen_https'] = false
nginx['proxy_set_headers'] = {
  "Host" => "git.lkho.me",
  "X-Real-IP" => "$remote_addr",
  "X-Forwarded-For" => "$proxy_add_x_forwarded_for",
  "X-Forwarded-Proto" => "https",
  "X-Forwarded-Ssl" => "on",
  "Upgrade" => "$http_upgrade",
  "Connection" => "$connection_upgrade"
}
nginx['gzip'] = "off"