Include canonicalWebURL in X-Origin-Url header in POST requests

When one build server receives webhook requests from multiple Gerrit
servers it needs a way to differentiate the origin of the events.

Include canonicalWebURL in the X-Origin-Url header:

  Content-Type: application/json; charset=utf-8
  X-Origin-Url: https://gerrit.example.com:8080/
  ...

  {"type":"ref-updated", ... }

Including canonicalWebURL in the request header instead of request body
allows us to keep the event json format compatible with the
stream-events format.

Change-Id: I856fb474176a40a6183adb54980a43e043a0eed3
1 file changed
tree: a232e6b863f4d565d094a2af64927939c71d8119
  1. src/
  2. tools/
  3. .gitignore
  4. bazlets.bzl
  5. BUILD
  6. external_plugin_deps.bzl
  7. WORKSPACE