1***@qq.com
1***@qq.com
  • 发布:2021-07-26 09:50
  • 更新:2021-07-26 09:50
  • 阅读:805

uni.request,自定义头部 报跨域

分类:uni-app

请求设置 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.

2021-07-26 09:50 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复