Merge pull request #14265 from mexon/mat/redirect-url

Use last URL from redirect chain
This commit is contained in:
Michael Vogel 2024-07-01 17:42:30 +02:00 committed by GitHub
commit d0a66d4f7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}
}