Merge branch 'master' into 11850-singlecontainer-max-requirements
[arvados.git] / services / keepproxy / proxy_client.go
index 2b25de247e879fc6fb333ef1ba1ff7895dac8cbe..3fa2671df58331bb52c16651ded3924e9390ee90 100644 (file)
@@ -1,3 +1,7 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
 package main
 
 import (
@@ -9,11 +13,13 @@ import (
 var viaAlias = "keepproxy"
 
 type proxyClient struct {
-       client keepclient.HTTPClient
-       proto  string
+       client    keepclient.HTTPClient
+       proto     string
+       requestID string
 }
 
 func (pc *proxyClient) Do(req *http.Request) (*http.Response, error) {
        req.Header.Add("Via", pc.proto+" "+viaAlias)
+       req.Header.Add("X-Request-Id", pc.requestID)
        return pc.client.Do(req)
 }