Authored by 毕凯

Docker 问题优化

... ... @@ -56,6 +56,11 @@ app.enable('trust proxy');
app.disable('x-powered-by');
// docker验证项目是否正常发布
app.use('/node/status.html', (req, res) => {
return res.status(204).end();
});
app.use((req, res, next) => {
req.url = stringProcess.decodeURIComponent(req.url) || '/404';// 错误的网址编码重定向404
req.isApmReport = _.get(req.app.locals, 'wap.open.bughd', false); // 把错误上报的开关绑定到上下文,node-lib 库要使用
... ... @@ -171,11 +176,6 @@ try {
app.use(downloadBar());
app.use(riskManagement());
// docker验证项目是否正常发布
app.use('/node/status.html', (req, res) => {
return res.status(204).end();
});
require('./dispatch')(app);
app.all('*', errorHanlder.notFound()); // 404
... ...
... ... @@ -86,7 +86,7 @@
"xml2js": "^0.4.19",
"yoho-express-session": "^2.0.0",
"yoho-md5": "^2.0.0",
"yoho-node-lib": "=0.6.10",
"yoho-node-lib": "=0.6.11",
"yoho-zookeeper": "^1.0.9"
},
"devDependencies": {
... ...