Geo mimicry: Use relative URLs where possible
As part of &5914, we can proxy through Geo secondaries while using a different URL.
There are absolute redirects in our frontend, for example during snippet creation, which cause write operations on the secondary to get redirected to the primary unexpectedly.
In the frontend, they are mostly calls to redirectTo()
which uses window.location.assign
which can receive relative paths.
Implementation Guide
-
Find absolute paths in GitLab Rails -
For each one, check if we can use a relative path instead of the absolute URL (as some of the redirects already use). -
If it is ok to use a relative path, then open an MR to change it -
If it is not ok to use a relative path, then link to the line of code in #339262
-
Edited by Michael Kozono