From 00d843cf83c656b77cde0ab5b3fc8608c7a69a7a Mon Sep 17 00:00:00 2001 From: Philipp Kerling Date: Sun, 8 Sep 2019 21:25:56 +0200 Subject: [PATCH] Use site_url for route-based RedirectResponse base_url does not actually add the base path if the given URL is absolute (i.e., starts with a slash) and does not add the indexPage. Both is necessary for the redirect response to work correctly in case of routes. site_url handles this correctly. Fixes #2119 --- system/HTTP/RedirectResponse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/HTTP/RedirectResponse.php b/system/HTTP/RedirectResponse.php index ad9f70b51cee..a2e31a866483 100644 --- a/system/HTTP/RedirectResponse.php +++ b/system/HTTP/RedirectResponse.php @@ -91,7 +91,7 @@ public function route(string $route, array $params = [], int $code = 302, string throw HTTPException::forInvalidRedirectRoute($route); } - return $this->redirect(base_url($route), $method, $code); + return $this->redirect(site_url($route), $method, $code); } /**