From a9ce6b92c47f7ade6d66c7de6dd188a81a0658d4 Mon Sep 17 00:00:00 2001 From: eric sciple Date: Thu, 9 Jun 2022 13:36:55 -0500 Subject: [PATCH] Allow redirect get message call to broker (#1935) --- src/Runner.Sdk/Util/VssUtil.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Runner.Sdk/Util/VssUtil.cs b/src/Runner.Sdk/Util/VssUtil.cs index e6b6f9f83..e4a7cd0bc 100644 --- a/src/Runner.Sdk/Util/VssUtil.cs +++ b/src/Runner.Sdk/Util/VssUtil.cs @@ -57,6 +57,10 @@ namespace GitHub.Runner.Sdk settings.SendTimeout = TimeSpan.FromSeconds(Math.Min(Math.Max(httpRequestTimeoutSeconds, 100), 1200)); } + if (StringUtil.ConvertToBoolean(Environment.GetEnvironmentVariable("GITHUB_ACTIONS_RUNNER_ALLOW_REDIRECT"))) + { + settings.AllowAutoRedirect = true; + } // Remove Invariant from the list of accepted languages. //