Commit cf0693b4 authored by Michael Kozono's avatar Michael Kozono

Secondaries get their own URL from config

Not from `geo_nodes.url`.
parent 8e028ffa
......@@ -14,7 +14,7 @@ module EE
return super if signed_in?
if ::Gitlab::Geo.secondary_with_primary?
redirect_to oauth_geo_auth_url(host: ::Gitlab::Geo.current_node.url, state: geo_login_state.encode)
redirect_to oauth_geo_auth_url(host: GeoNode.current_node_url, state: geo_login_state.encode)
else
super
end
......
......@@ -27,7 +27,7 @@ describe SessionsController, :geo do
redirect_params = CGI.parse(redirect_uri.query)
expect(response).to have_gitlab_http_status(302)
expect(response).to redirect_to %r(\A#{primary_node.url}oauth/geo/auth)
expect(response).to redirect_to %r(\A#{Gitlab.config.gitlab.url}/oauth/geo/auth)
expect(redirect_params['state'].first).to end_with(':')
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment