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
78bbf37f71424195b587af2d54a251a17cd23f3f
1 parent
6e7fe478
修改未登录跳转问题
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 @
78bbf37
...
...
@@ -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
(
/^
\/\/(
.
*
?)\/
/
);
// 尝试匹配 '//' 开头的不规范的URL
let
matchFunc
;
if
(
formalUrl
.
protocol
)
{
...
...
Please
register
or
login
to post a comment