node配置请求头 node解决跨域问题 node 使用bodyParser 配置接收的数据大小
// 跨域
app.all('*', function (req, res, next) {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Headers', 'Content-Type');
res.header('Access-Control-Allow-Methods', '*');
next();
});
// 参数处理
app.use(bodyParser.json({ limit: '100mb' }))
app.use(bodyParser.urlencoded({ limit: '100mb', extended: false }))
A little hug, little gift.
All of little something.
these are our meories.