diff --git a/lib/router.js b/lib/router.js index a4c2d13921..f8348f7ad9 100644 --- a/lib/router.js +++ b/lib/router.js @@ -22,14 +22,13 @@ for (const project in RouterPath) { // index router.get('/', require('./routes/index')); -router.get('/robots.txt', async (ctx, next) => { +router.get('/robots.txt', async (ctx) => { if (config.disallowRobot) { ctx.set('Content-Type', 'text/plain'); ctx.body = 'User-agent: *\nDisallow: /'; } else { ctx.throw(404, 'Not Found'); } - await next(); }); // test