请求设置 header:{}
header里自定义了几个属性
header:{
token: ‘xxx’
timestamp: ''+time,
signature: rsaData
},
只有token,没啥问题。另外两个不行,后端设置Access-Control-Allow-Headers后,还是不行!!
Access to XMLHttpRequest at 'http://10.1.1.109:8080/ycej-vfs/app/getTodoListNum' from origin 'http://localhost:8080' has been blocked by CORS policy: Request header field timestamp is not allowed by Access-Control-Allow-Headers in preflight response.
0 个回复