File tree Expand file tree Collapse file tree 5 files changed +16
-10
lines changed
Expand file tree Collapse file tree 5 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -2485,7 +2485,7 @@ COS.util = {
24852485 json2xml : util . json2xml
24862486} ;
24872487COS . getAuthorization = util . getAuth ;
2488- COS . version = '1.3.3 ' ;
2488+ COS . version = '1.3.4 ' ;
24892489
24902490module . exports = COS ;
24912491
@@ -8049,13 +8049,17 @@ function getUrl(params) {
80498049}
80508050
80518051var getSignHost = function ( opt ) {
8052- if ( ! opt . Bucket || ! opt . Bucket ) return '' ;
8052+ if ( ! opt . Bucket || ! opt . Region ) return '' ;
8053+ var region = opt . Region ;
8054+ if ( this . options . UseAccelerate ) {
8055+ region = 'accelerate' ;
8056+ }
80538057 var url = opt . Url || getUrl ( {
80548058 ForcePathStyle : this . options . ForcePathStyle ,
80558059 protocol : this . options . Protocol ,
80568060 domain : this . options . Domain ,
80578061 bucket : opt . Bucket ,
8058- region : opt . Region
8062+ region : region
80598063 } ) ;
80608064 var urlHost = url . replace ( / ^ h t t p s ? : \/ \/ ( [ ^ / ] + ) ( \/ .* ) ? $ / , '$1' ) ;
80618065 var standardHostReg = new RegExp ( '^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$' ) ;
@@ -8065,7 +8069,6 @@ var getSignHost = function (opt) {
80658069
80668070// 异步获取签名
80678071function getAuthorizationAsync ( params , callback ) {
8068-
80698072 var headers = util . clone ( params . Headers ) ;
80708073 var headerHost = '' ;
80718074 util . each ( headers , function ( v , k ) {
Original file line number Diff line number Diff line change 11{
22 "name" : " cos-js-sdk-v5" ,
3- "version" : " 1.3.3 " ,
3+ "version" : " 1.3.4 " ,
44 "description" : " JavaScript SDK for [腾讯云对象存储](https://cloud.tencent.com/product/cos)" ,
55 "main" : " index.js" ,
66 "types" : " index.d.ts" ,
Original file line number Diff line number Diff line change @@ -3183,13 +3183,17 @@ function getUrl(params) {
31833183}
31843184
31853185var getSignHost = function ( opt ) {
3186- if ( ! opt . Bucket || ! opt . Bucket ) return '' ;
3186+ if ( ! opt . Bucket || ! opt . Region ) return '' ;
3187+ var region = opt . Region ;
3188+ if ( this . options . UseAccelerate ) {
3189+ region = 'accelerate' ;
3190+ }
31873191 var url = opt . Url || getUrl ( {
31883192 ForcePathStyle : this . options . ForcePathStyle ,
31893193 protocol : this . options . Protocol ,
31903194 domain : this . options . Domain ,
31913195 bucket : opt . Bucket ,
3192- region : opt . Region ,
3196+ region : region ,
31933197 } ) ;
31943198 var urlHost = url . replace ( / ^ h t t p s ? : \/ \/ ( [ ^ / ] + ) ( \/ .* ) ? $ / , '$1' ) ;
31953199 var standardHostReg = new RegExp ( '^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$' ) ;
@@ -3200,7 +3204,6 @@ var getSignHost = function (opt) {
32003204
32013205// 异步获取签名
32023206function getAuthorizationAsync ( params , callback ) {
3203-
32043207 var headers = util . clone ( params . Headers ) ;
32053208 var headerHost = '' ;
32063209 util . each ( headers , function ( v , k ) {
Original file line number Diff line number Diff line change @@ -77,6 +77,6 @@ COS.util = {
7777 json2xml : util . json2xml ,
7878} ;
7979COS . getAuthorization = util . getAuth ;
80- COS . version = '1.3.3 ' ;
80+ COS . version = '1.3.4 ' ;
8181
8282module . exports = COS ;
You can’t perform that action at this time.
0 commit comments