直接給出解決方式:
let client = new OSS({
accessKeyId: data.data.AccessKey,
accessKeySecret: data.data.AccessKeySecret,
stsToken: data.data.SecurityToken,
bucket: data.data.bucket,
endpoint: data.data.endpoint
});
client.options.endpoint.protocol="https:"
其實主要就是增加了:client.options.endpoint.protocol="https:" 代碼