使用微信云托管中的对象存储参考 https://developers.weixin.qq.com/miniprogram/dev/wxcloudservice/wxcloudrun/src/development/storage/service/cos-sdk.html#%E4%BA%94%E3%80%81%E4%BD%BF%E7%94%A8%E6%A1%88%E4%BE%8B 已经配置了云调用微信令牌权限,但是云托管中业务调用调用 http://api.weixin.qq.com/_/cos/getauth 接口提示301
{
data: null,
status: 301,
headers: {
connection: 'close',
location: 'https://api.weixin.qq.com/_/cos/getauth',
'content-length': '0'
},
res: {
status: 301,
statusCode: 301,
statusMessage: 'Moved Permanently',
headers: {
connection: 'close',
location: 'https://api.weixin.qq.com/_/cos/getauth',
'content-length': '0'
},
size: 0,
aborted: false,
rt: 156,
keepAliveSocket: false,
data: null,
requestUrls: [ 'http://api.weixin.qq.com/_/cos/getauth' ],
timing: null,
remoteAddress: '117.144.228.62',
remotePort: 80,
socketHandledRequests: 1,
socketHandledResponses: 1
}
}