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
周奇琪
8 years ago
Commit
08ab748590a5fa5efc005c41867862be494b4c79
1 parent
79b230eb
提交逛和列表页的CDN回源子域名
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
doraemon/middleware/sub-domain.js
doraemon/middleware/sub-domain.js
View file @
08ab748
...
...
@@ -25,10 +25,12 @@ module.exports = () => {
if
(
req
.
subdomains
.
length
)
{
switch
(
req
.
subdomains
[
0
])
{
case
'guang'
:
// 逛
case
'cdnsrcguang'
:
// CDN 逛 回源地址
req
.
url
=
req
.
url
.
replace
(
'/guang'
,
''
);
req
.
url
=
`
/
guang$
{
req
.
url
}
`
;
break
;
case
'list'
:
// list
case
'cdnsrclist'
:
// CDN list 回源域名
if
(
req
.
path
===
'/'
)
{
req
.
url
=
`
/
product
/
index
/
index
?
$
{
querystring
.
stringify
(
req
.
query
)}
`
;
}
...
...
Please
register
or
login
to post a comment