...
|
...
|
@@ -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
|
|
|
|
...
|
...
|
|