Commit 17310da1 authored by Michael Kozono's avatar Michael Kozono

Merge branch 'cat-always-redirect-geo-primary-external-url' into 'master'

Redirect Geo git push operations to primary external URL

See merge request gitlab-org/gitlab!71711
parents 801783c5 98780b7e
......@@ -220,7 +220,7 @@ module EE
File.join(geo_secondary_referrer_path_prefix, geo_request_fullpath_for_primary)
end
::Gitlab::Utils.append_path(::Gitlab::Geo.primary_node.internal_url, path)
::Gitlab::Utils.append_path(::Gitlab::Geo.primary_node.url, path)
end
def geo_secondary_referrer_path_prefix
......
......@@ -13,8 +13,9 @@ RSpec.describe "Git HTTP requests (Geo)", :geo do
let_it_be(:project_no_repo) { create(:project, :private) }
let_it_be(:primary_url) { 'http://primary.example.com' }
let_it_be(:primary_internal_url) { 'http://primary-internal.example.com' }
let_it_be(:secondary_url) { 'http://secondary.example.com' }
let_it_be(:primary) { create(:geo_node, :primary, url: primary_url) }
let_it_be(:primary) { create(:geo_node, :primary, url: primary_url, internal_url: primary_internal_url) }
let_it_be(:secondary) { create(:geo_node, url: secondary_url) }
let!(:user) { create(:user) }
......
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