Use last URL from redirect chain

This commit is contained in:
Matthew Exon 2024-07-01 08:07:39 +02:00
parent 16f5d2033d
commit 1049ac4779

View file

@ -89,7 +89,7 @@ class GuzzleResponse extends Response implements ICanHandleHttpResponses, Respon
$headersRedirect = $response->getHeader(RedirectMiddleware::HISTORY_HEADER) ?? []; $headersRedirect = $response->getHeader(RedirectMiddleware::HISTORY_HEADER) ?? [];
if (count($headersRedirect) > 0) { if (count($headersRedirect) > 0) {
$this->redirectUrl = $headersRedirect[0]; $this->redirectUrl = end($headersRedirect);
$this->isRedirectUrl = true; $this->isRedirectUrl = true;
} }
} }