使用MEAN.JS可能会导致服务器错误更改此内容:
http://localhost:3000/#!/
要:
http://localhost:3000/%C0#!/
错误:错误请求 在SendStream.error(/home/username/Project/node_modules/express/node_modules/send/index.js:239:16) 在SendStream.pipe(/home/username/Project/node_modules/express/node_modules/send/index.js:411:32) 在serveStatic(/home/username/Project/node_modules/express/node_modules/serve-static/index.js:110:12) 在Layer.handle [as handle_request](/home/username/Project/node_modules/express/lib/router/layer.js:82:5) 在trim_prefix(/home/username/Project/node_modules/express/lib/router/index.js:269:13) at /home/username/Project/node_modules/express/lib/router/index.js:236:9 在Function.proto.process_params(/home/username/Project/node_modules/express/lib/router/index.js:311:12) at /home/username/Project/node_modules/express/lib/router/index.js:227:12 在Function.match_layer(/home/ec2-user/Project/node_modules/express/lib/router/index.js:294:3) 在下一个(/home/username/Project/node_modules/express/lib/router/index.js:188:10)
我们可以看到服务器的用户名,这很危险......
有任何解决此错误的建议吗?
答案 0 :(得分:0)
解决方案很简单。只需要修改文件app/views/500.server.view.html