Skip to content

Set OmniAuth full_host parameter to ensure redirect URIs are correct

Stan Hu requested to merge stanhu/gitlab-ce:set-omniauth-full-host into master

What does this MR do?

This MR sets the OmniAuth full_host parameter to the configured GitLab URL to ensure the redirect_uri parameter is called with the right GitLab host.

Why was this MR needed?

OmniAuth attempts to grab the request URI and use that. If you set up a reverse proxy that terminates SSL at the Web server layer (e.g. https://gitlab.domain.com), omniauth will use the internal URL (e.g. http://my-host:8080) in its redirect URI unless all the Web server headers are properly set (e.g. X-Forwarded-Port, etc.). This is easy to forget or mess up, and it's better to ensure that OmniAuth has the right value from the start.

What are the relevant issue numbers?

Closes #1967 (closed)

Merge request reports