From e9d2afa22879190632076dcf6578c78fc20de907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Verstraeten?= Date: Sat, 13 Jun 2026 12:23:49 +0200 Subject: [PATCH] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- machinery/src/cloud/tus_client.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/machinery/src/cloud/tus_client.go b/machinery/src/cloud/tus_client.go index 1859260..faa2903 100644 --- a/machinery/src/cloud/tus_client.go +++ b/machinery/src/cloud/tus_client.go @@ -134,6 +134,19 @@ func runTusUpload(baseURL, metadata, fileName, label, slot string, setHeaders tu size := info.Size() client := newVaultHTTPClient(0) + client.CheckRedirect = func(req *http.Request, via []*http.Request) error { + if len(via) == 0 { + return nil + } + if req.URL.Host != via[0].URL.Host { + for k := range req.Header { + if strings.HasPrefix(http.CanonicalHeaderKey(k), "X-Kerberos-") { + req.Header.Del(k) + } + } + } + return nil + } sidecar := tusSidecarPath(fileName, slot) uploadURL := loadTusResumeState(sidecar, baseURL)