Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
郭成尧
7 years ago
Commit
4cfa378bd8d96531bbb68acce6c3bde640ad5381
1 parent
abd02d22
client_type-no-cookie
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
app.js
app.js
View file @
4cfa378
...
...
@@ -103,8 +103,7 @@ app.use((req, res, next) => {
// 判断请求是否来自app
req
.
yoho
.
isMiniApp
=
/miniProgram/i
.
test
(
req
.
get
(
'User-Agent'
)
||
''
)
||
req
.
query
.
client_type
===
'miniapp'
||
req
.
cookies
.
app_client_type
===
'miniapp'
;
req
.
query
.
client_type
===
'miniapp'
;
req
.
yoho
.
isNowApp
=
/yohonow/i
.
test
(
req
.
get
(
'User-Agent'
)
||
''
);
req
.
yoho
.
isMarsApp
=
/yohomars/i
.
test
(
req
.
get
(
'User-Agent'
)
||
''
);
req
.
yoho
.
isYohoApp
=
/YohoBuy/i
.
test
(
req
.
get
(
'User-Agent'
)
||
''
);
...
...
Please
register
or
login
to post a comment