node.js express.js根路由redirect到//
我想在我的node.js express.js应用程序中路由根路由(http:// server:5000 /):
当我去http://服务器:5000 /我得到:redirect到/ /
如果我有路线,我会得到相同的信息:
app.get('/',routes.index);
可能是什么问题?
这是Windows中的一个连接错误: https : //github.com/senchalabs/connect/issues/427
您应该在Connect静态中间件中更新或设置redirect选项为false。