Skip to content

Commit a813fc6

Browse files
committed
fix:修复host签名时不兼容全球加速域名
1 parent 49892f6 commit a813fc6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cos-nodejs-sdk-v5",
3-
"version": "2.11.5",
3+
"version": "2.11.6",
44
"description": "cos nodejs sdk v5",
55
"main": "index.js",
66
"types": "index.d.ts",

sdk/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3321,7 +3321,7 @@ var getSignHost = function (opt) {
33213321
protocol: this.options.Protocol,
33223322
domain: this.options.Domain,
33233323
bucket: opt.Bucket,
3324-
region: opt.Region,
3324+
region: this.options.UseAccelerate ? 'accelerate' : opt.Region,
33253325
});
33263326
var urlHost = url.replace(/^https?:\/\/([^/]+)(\/.*)?$/, '$1');
33273327
var standardHostReg = new RegExp('^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$');

0 commit comments

Comments
 (0)