Authored by 郝肖肖

Merge branch 'release/6.5.3' of git.yoho.cn:fe/yohobuywap-node into release/6.5.3

... ... @@ -153,8 +153,6 @@ try {
app.use(itemNameHandler);
app.use(setYohoData());
app.use(user());
app.use(seo());
app.use(setPageInfo());
// 请求限制中间件
if (!app.locals.devEnv) {
... ... @@ -165,6 +163,8 @@ try {
app.use(devtools());
}
app.use(seo());
app.use(setPageInfo());
app.use(layoutTools());
app.use(pageCache());
app.use(routeEncode.md);
... ...
... ... @@ -4,7 +4,18 @@
const path = require('path');
module.exports = {
/**
* 有货小程序验证
*/
verify(req, res) {
res.sendFile(path.join(__dirname, '../../../public/static/hfxRaNY27L.txt'));
},
/**
* 线下店小程序验证
*/
store(req, res) {
res.sendFile(path.join(__dirname, '../../../public/static/OFRuhJ43rY.txt'));
}
};
... ...
... ... @@ -40,7 +40,13 @@ router.get('/activity/manifest.json', pwa.manifest);
// 小程序使用的域名验证文件
router.get('/hfxRaNY27L.txt', miniapp.verify);
router.get('/activity/hfxRaNY27L.txt', miniapp.verify);
router.get('/shop/hfxRaNY27L.txt', miniapp.verify);
router.get('/product/shop/hfxRaNY27L.txt', miniapp.verify);
router.get('/product/hfxRaNY27L.txt', miniapp.verify);
// 线下店使用的域名验证文件
router.get('/OFRuhJ43rY.txt', miniapp.store);
router.get('/activity/OFRuhJ43rY.txt', miniapp.store);
router.get('/product/shop/OFRuhJ43rY.txt', miniapp.store);
router.get('/product/OFRuhJ43rY.txt', miniapp.store);
module.exports = router;
... ...
... ... @@ -201,14 +201,9 @@ module.exports = class extends global.yoho.BaseModel {
});
}
if (orderDetail.links) {
_.forEach(orderDetail.links, (val) => {
if (val === 'getExpress') {
orderDetail = _.assign(orderDetail, {
expressUrl: helpers.urlFormat('/home/logistic', {order_code: orderCode})
});
return;
}
if (_.get(orderDetail, 'orderDetailInfo.ext.needHref') === 'Y') {
orderDetail = _.assign(orderDetail, {
expressUrl: helpers.urlFormat('/home/logistic', {order_code: orderCode})
});
}
... ...
... ... @@ -148,17 +148,17 @@ module.exports = {
}
},
REQUEST_LIMIT: {
// 10s 最多访问5次
10: 10,
// 10s 最多访问20次
10: 20,
// 30s 最多访问15次
30: 20,
// 30s 最多访问40次
30: 40,
// 60s 最多访问15次
60: 30,
// 60s 最多访问60次
60: 60,
// 100s 最多访问15次
600: 100
// 100s 最多访问200次
600: 200
},
superCapture: '93c70db61fe276f93ce781ad17dc47cd',
from: from
... ...
... ... @@ -19,18 +19,33 @@ const IP_WHITE_LIST = [
'218.94.75.58',
'218.94.75.50',
'218.94.77.166',
'10.66.70.21', // 联盟 生产 IP
'222.73.196.18' // B站合作方单击次数快加白名单
];
const PATH_WHITE_LIST = [
'/3party/check',
'/3party/check/submit',
'/passport/imagesNode',
'/passport/cert/headerTip',
'/passport/captcha/get',
'/passport/images',
'/passport/img-check.jpg',
'/passport/geetest/register'
'/passport/geetest/register',
'/activity/individuation',
'/activity/individuation/coupon',
'/activity/share',
'/activity/wechat/share',
'/activity/wechat/1111',
'/api/switch',
'/passport/login/user',
'/sw.js',
'/manifest.json',
'/activity/sw.js',
'/activity/manifest.json',
'/hfxRaNY27L.txt',
'/activity/hfxRaNY27L.txt',
'/product/shop/hfxRaNY27L.txt',
'/product/hfxRaNY27L.txt',
'/.well-known/apple-app-site-association',
'/service/sitemap.xml'
];
const limiter = (rule, policy, context) => {
... ...
... ... @@ -59,7 +59,7 @@ module.exports = () => {
req.url = `/product/search${req.path}`;
}
if (/^\/(list|shop)/.test(req.url) && req.url.indexOf('hfxRaNY27L') < 0) {
if (/^\/(list|shop)/.test(req.url)) {
// 商品列表页、全球购商品列表页、店铺首页路由
req.url = `/product${req.url}`;
}
... ...
84e2e0416b10c7872b4983ad2c63892e
\ No newline at end of file
... ...
User-Agent: *
Disallow: /passport
Disallow: /cart
Disallow: /passport/
Disallow: /cart/
Disallow: /home/
Disallow: /service/
Disallow: /3party
Disallow: /api
Disallow: /hf
Disallow: /rn
Sitemap: https://m.yohobuy.com/sitemap.xml
\ No newline at end of file
Disallow: /3party/
Disallow: /api/
Disallow: /hf/
Disallow: /rn/
Disallow: /*?*
Disallow: /coupon/
Disallow: /brands/search/
Disallow: /activity/
Disallow: /product/detail/
Disallow: /reg.html
Disallow: /signin.html
Disallow: /search/
... ...