Skip to content

Commit

Permalink
fix: patch up external url redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Dec 4, 2024
1 parent 38edd9a commit 75ebfa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public function redirect($url, int $status = 302, bool $exit = true)
$url = app()->route($url[0]);
}

if (class_exists('Leaf\App')) {
if (class_exists('Leaf\App') && !strpos($url, '://')) {
$url = str_replace('//', '/', app()->getBasePath() . $url);
}

Expand Down

0 comments on commit 75ebfa2

Please sign in to comment.