Send Geo proxied site data through Workhorse HTTP headers
What does this MR do and why?
We need to find at runtime which node is proxying the current request on the primary site, so we are also saving and sending extra JWT-signed proxy data through headers in Workhorse, similar to the already existing "is proxied or not" header.
Part of #344568 (closed)
Screenshots or screen recordings
How to set up and validate locally
- Have a GDK + Geo setup with unified URLs
- Checkout this branch
-
cd $gdk/gitlab/workhorse && make && gdk restart gitlab-workhorse
on the secondary site
Since this is not a user-visible change, there's no "real" place to notice this is changing on the primary, but you can:
- Add a
byebug
insideee/lib/gitlab/geo.rb
in theproxied_request?
method - Go to a project, or an issue on the secondary (where this is already being called)
- Inside debugger, run an
env
to check that the header is there with the expected JWT signed data
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Catalin Irimie