Geo proxying breaks when used together with relative root paths
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
When Geo proxying for secondary is enabled and a relative path is configured for either Primary or Secondary sites, trying to access the Secondary site directly will return a 404
error.
Steps to reproduce
- Make sure Geo proxying for secondary is enabled on the instance
- Configure a relative path by adding a unique "/path" to the end of the
external_url
setting of both Primary and Secondary sites. - Try to directly access the Secondary site's URL
404 error
Example Project
TBD -- I haven't attempted to reproduce the issue yet, and have to say it might be linked to using reverse proxies in combination with the steps above.
What is the current bug behavior?
Secondary site becomes inaccessible when using relative URL's and Geo Proxying for Secondary
What is the expected correct behavior?
Secondary site should be correctly proxied to Primary, independently of relative paths being configured.
Relevant logs and/or screenshots
Possible fixes
Implementation Plan
- Investigate and reproduce the 404 noted in the issue (awaiting further info on this), along with the 503 issue mentioned in this comment.
- In the near term, if these issues can be reproduced, we need to document the limitation both here https://docs.gitlab.com/install/relative_url/ and here https://docs.gitlab.com/omnibus/settings/configuration/#configuring-a-relative-url-for-gitlab - and also include a note in the external_url config section of Geo - https://docs.gitlab.com/administration/geo/setup/two_single_node_sites/
- Without further investigation it might be worth looking in
workhorse/internal/proxy/proxy.go
to determine the root cause.
Edited by 🤖 GitLab Bot 🤖