Avoid following redirects in aggregator availability controller

This commit is contained in:
Jordan Liggitt
2022-09-28 09:34:51 -04:00
parent 8cbe9e91c8
commit 2d397e8530
3 changed files with 56 additions and 16 deletions

View File

@@ -392,7 +392,7 @@ func TestAggregatedAPIServerRejectRedirectResponse(t *testing.T) {
if strings.HasSuffix(r.URL.Path, "tryRedirect") {
http.Redirect(w, r, redirectedURL+"/redirectTarget", http.StatusMovedPermanently)
} else {
http.Redirect(w, r, redirectedURL, http.StatusMovedPermanently)
w.WriteHeader(http.StatusOK)
}
}))
defer redirectServer.Close()