16306: Circumvent Rails redirect-to-https in workbench health check.
authorTom Clegg <tom@curii.com>
Mon, 28 Dec 2020 15:33:27 +0000 (10:33 -0500)
committerTom Clegg <tom@curii.com>
Mon, 28 Dec 2020 15:33:27 +0000 (10:33 -0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

sdk/go/health/aggregator.go

index 794adabdd3926b6b04036a6c62b1044f2e8f13d5..a666ef8ec02803354e80bc3a80e61910b5f3c0f4 100644 (file)
@@ -193,6 +193,9 @@ func (agg *Aggregator) ping(target *url.URL) (result CheckResult) {
        }
        req.Header.Set("Authorization", "Bearer "+agg.Cluster.ManagementToken)
 
+       // Avoid workbench1's redirect-http-to-https feature
+       req.Header.Set("X-Forwarded-Proto", "https")
+
        ctx, cancel := context.WithTimeout(req.Context(), time.Duration(agg.timeout))
        defer cancel()
        req = req.WithContext(ctx)