1 parent 1ef684a commit d00d0d9Copy full SHA for d00d0d9
1 file changed
samples/node/web/vue/vue-todo/app.js
@@ -22,7 +22,11 @@ app.use(staticFiles('/static/', __dirname + '/static'));
22
23
// redirect to /static/index.html:
24
app.use(async (ctx, next) => {
25
- ctx.response.redirect('/static/index.html');
+ if (ctx.request.path === '/') {
26
+ ctx.response.redirect('/static/index.html');
27
+ } else {
28
+ await next();
29
+ }
30
});
31
32
app.listen(3000);
0 commit comments