cos-wx-sdk-v5 1.1.2 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/demo/lib/cos-wx-sdk-v5.js +11 -3
- package/demo/lib/cos-wx-sdk-v5.min.js +1 -1
- package/demo-album/lib/cos-wx-sdk-v5.js +11 -3
- package/demo-album/lib/cos-wx-sdk-v5.min.js +1 -1
- package/package.json +2 -2
- package/src/base.js +10 -2
- package/src/cos.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
9
9
|
|
|
10
|
+
## [v1.1.3](https://github.com/tencentyun/cos-wx-sdk-v5/compare/v1.1.2...v1.1.3) - 2021-12-03
|
|
11
|
+
|
|
12
|
+
feat
|
|
13
|
+
-sdk入口文件默认为压缩版
|
|
14
|
+
|
|
15
|
+
### Commits
|
|
16
|
+
|
|
17
|
+
- Merge https://github.com/tencentyun/cos-wx-sdk-v5 [`12c3dd0`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/12c3dd0ecce6a1a73b792dde8f395dccc06aa3f4)
|
|
18
|
+
- Updated CHANGELOG.md [`9d49a86`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/9d49a86a7f805ea950632392f4a878fb87ef265f)
|
|
19
|
+
- upd:入口文件默认为压缩版文件 [`0f8a772`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/0f8a772da7046bef25757109fba1419ff248d63f)
|
|
20
|
+
|
|
21
|
+
## [v1.1.2](https://github.com/tencentyun/cos-wx-sdk-v5/compare/v1.1.1...v1.1.2) - 2021-12-01
|
|
22
|
+
|
|
23
|
+
- host参与签名
|
|
24
|
+
- getObjectUrl签名签入Query
|
|
25
|
+
- 新增参与签名的headers白名单
|
|
26
|
+
- 支持打包出.min.js
|
|
27
|
+
|
|
28
|
+
### Merged
|
|
29
|
+
|
|
30
|
+
- Feat/1.1.2 [`#57`](https://github.com/tencentyun/cos-wx-sdk-v5/pull/57)
|
|
31
|
+
- fix:CIHost兼容处理 [`#56`](https://github.com/tencentyun/cos-wx-sdk-v5/pull/56)
|
|
32
|
+
|
|
33
|
+
### Commits
|
|
34
|
+
|
|
35
|
+
- feat:1.1.2 [`cdd3f1b`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/cdd3f1b8f405d8d13f990b6b4c65253df5f3f725)
|
|
36
|
+
- upd:getObjectUrl的qUrlParamList encode处理 [`2deb189`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/2deb1899386c66c714e88e65291278c8261c80bb)
|
|
37
|
+
- upd [`2c1f670`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/2c1f6701e9755dbcc34ea1e875017cecf6419bdd)
|
|
38
|
+
- upd:删除重复代码 [`dbaa639`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/dbaa639a51513bb548306e88b0f1858cb530067d)
|
|
39
|
+
- Updated CHANGELOG.md [`96d4679`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/96d467902d0a447508ea7157cf93e431bf3af07b)
|
|
40
|
+
- fix:request queryString [`54e7c31`](https://github.com/tencentyun/cos-wx-sdk-v5/commit/54e7c31f4e0a115fe268fbb911c5dea959ce2397)
|
|
41
|
+
|
|
42
|
+
## [v1.1.1](https://github.com/tencentyun/cos-wx-sdk-v5/compare/v1.1.0...v1.1.1) - 2021-11-18
|
|
43
|
+
|
|
44
|
+
fix:CIHost兼容处理
|
|
45
|
+
|
|
10
46
|
## [v1.1.0](https://github.com/tencentyun/cos-wx-sdk-v5/compare/v1.0.13...v1.1.0) - 2021-11-17
|
|
11
47
|
|
|
12
48
|
- 新增appendObject接口
|
|
@@ -2306,7 +2306,7 @@ base.init(COS, task);
|
|
|
2306
2306
|
advance.init(COS, task);
|
|
2307
2307
|
|
|
2308
2308
|
COS.getAuthorization = util.getAuth;
|
|
2309
|
-
COS.version = '1.1.
|
|
2309
|
+
COS.version = '1.1.5';
|
|
2310
2310
|
|
|
2311
2311
|
module.exports = COS;
|
|
2312
2312
|
|
|
@@ -7259,6 +7259,14 @@ function postObject(params, callback) {
|
|
|
7259
7259
|
headers['x-cos-storage-class'] = params['StorageClass'];
|
|
7260
7260
|
headers['x-cos-mime-limit'] = params['MimeLimit'];
|
|
7261
7261
|
headers['x-cos-traffic-limit'] = params['TrafficLimit'];
|
|
7262
|
+
// SSE-C
|
|
7263
|
+
headers['x-cos-server-side-encryption-customer-algorithm'] = params['SSECustomerAlgorithm'];
|
|
7264
|
+
headers['x-cos-server-side-encryption-customer-key'] = params['SSECustomerKey'];
|
|
7265
|
+
headers['x-cos-server-side-encryption-customer-key-MD5'] = params['SSECustomerKeyMD5'];
|
|
7266
|
+
// SSE-COS、SSE-KMS
|
|
7267
|
+
headers['x-cos-server-side-encryption'] = params['ServerSideEncryption'];
|
|
7268
|
+
headers['x-cos-server-side-encryption-cos-kms-key-id'] = params['SSEKMSKeyId'];
|
|
7269
|
+
headers['x-cos-server-side-encryption-context'] = params['SSEContext'];
|
|
7262
7270
|
|
|
7263
7271
|
// 删除 Content-Length 避免签名错误
|
|
7264
7272
|
delete headers['Content-Length'];
|
|
@@ -8419,13 +8427,13 @@ function getUrl(params) {
|
|
|
8419
8427
|
}
|
|
8420
8428
|
|
|
8421
8429
|
var getSignHost = function getSignHost(opt) {
|
|
8422
|
-
if (!opt.Bucket || !opt.
|
|
8430
|
+
if (!opt.Bucket || !opt.Region) return '';
|
|
8423
8431
|
var url = opt.Url || getUrl({
|
|
8424
8432
|
ForcePathStyle: this.options.ForcePathStyle,
|
|
8425
8433
|
protocol: this.options.Protocol,
|
|
8426
8434
|
domain: this.options.Domain,
|
|
8427
8435
|
bucket: opt.Bucket,
|
|
8428
|
-
region: opt.Region
|
|
8436
|
+
region: this.options.UseAccelerate ? 'accelerate' : opt.Region
|
|
8429
8437
|
});
|
|
8430
8438
|
var urlHost = url.replace(/^https?:\/\/([^/]+)(\/.*)?$/, '$1');
|
|
8431
8439
|
var standardHostReg = new RegExp('^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$');
|