Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
王水玲
9 years ago
Commit
cca7f0d187e8d803b14a669d943bb36c2f31bd05
1 parent
78bbf37f
bug修改
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
doraemon/middleware/safe-redirect.js
doraemon/middleware/safe-redirect.js
View file @
cca7f0d
...
...
@@ -19,7 +19,7 @@ const _ = require('lodash');
*/
const
safeRedirect
=
(
uri
)
=>
{
let
formalUrl
=
url
.
parse
(
uri
);
// 匹配标准的URL
let
informalUrl
=
uri
.
match
(
/^
\/\/(
.*
?)\/
/
);
// 尝试匹配 '//' 开头的不规范的URL
let
informalUrl
=
uri
.
match
(
/^
\/\/(
[\w\d\-
.
]
+
)
.*
/
);
// 尝试匹配 '//' 开头的不规范的URL
let
matchFunc
;
if
(
formalUrl
.
protocol
)
{
...
...
Please
register
or
login
to post a comment