From: Tom Clegg Date: Mon, 28 Dec 2020 15:33:27 +0000 (-0500) Subject: 16306: Circumvent Rails redirect-to-https in workbench health check. X-Git-Tag: 2.2.0~141^2~28 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/d77f9e6f8a14e14f477dfbf944914c78d0805e9f 16306: Circumvent Rails redirect-to-https in workbench health check. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- diff --git a/sdk/go/health/aggregator.go b/sdk/go/health/aggregator.go index 794adabdd3..a666ef8ec0 100644 --- a/sdk/go/health/aggregator.go +++ b/sdk/go/health/aggregator.go @@ -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)