github地址https://github.com/koajs/koa/blob/master/docs/migration.md
app.use(async (ctx, next) => {
await next();
if(parseInt(ctx.status) === 404 ){
ctx.response.redirect("/404")
}
})
koa2处理统一处理404页面
最新推荐文章于 2024-02-22 21:38:45 发布