Skip to content

Commit 87d1008

Browse files
author
Ethan
committed
redirect.to
1 parent 6d0306a commit 87d1008

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Redirect.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ class Redirect
1414
*/
1515
public static function to($url, $params = array())
1616
{
17-
// 以这些开头的直接跳转: "/"、"http://"、"https://"
18-
//if (stripos($url, '/') === 0 || preg_match('/^http(s)?:\/\//i', $url)) {
17+
// 以这些开头的直接跳转: "http://"、"https://"
1918
if (preg_match('/^http(s)?:\/\//i', $url)) {
2019
return new RedirectResponse($url);
2120
}

0 commit comments

Comments
 (0)