Skip to content

Commit 75ebfa2

Browse files
committed
fix: patch up external url redirects
1 parent 38edd9a commit 75ebfa2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public function redirect($url, int $status = 302, bool $exit = true)
269269
$url = app()->route($url[0]);
270270
}
271271

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

0 commit comments

Comments
 (0)