Skip to content

Send Geo proxied site data through Workhorse HTTP headers

Catalin Irimie requested to merge cat-geo-pass-proxied-node-id into master

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

  1. Have a GDK + Geo setup with unified URLs
  2. Checkout this branch
  3. 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:

  1. Add a byebug inside ee/lib/gitlab/geo.rb in the proxied_request? method
  2. Go to a project, or an issue on the secondary (where this is already being called)
  3. 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.

Edited by Catalin Irimie

Merge request reports

Loading