diff --git a/src/Network/HTTPClient/Response/GuzzleResponse.php b/src/Network/HTTPClient/Response/GuzzleResponse.php index d277f2a8df..6dbccbff9f 100644 --- a/src/Network/HTTPClient/Response/GuzzleResponse.php +++ b/src/Network/HTTPClient/Response/GuzzleResponse.php @@ -89,7 +89,7 @@ class GuzzleResponse extends Response implements ICanHandleHttpResponses, Respon $headersRedirect = $response->getHeader(RedirectMiddleware::HISTORY_HEADER) ?? []; if (count($headersRedirect) > 0) { - $this->redirectUrl = $headersRedirect[0]; + $this->redirectUrl = end($headersRedirect); $this->isRedirectUrl = true; } }