- 跨域使用了json
// 后端设置http头部, 允许跨域使用json数据格式
ctx.set("Content-Type", "application/json;charset=utf-8");
ctx.set('Access-Control-Allow-Origin','*')
ctx.set("Access-Control-Allow-Headers", " Origin, X-Requested-With, Content-Type, Accept");
- 后端设置了csp