File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -3133,20 +3133,14 @@ function getObjectUrl(params, callback) {
31333133 queryParamsStr += ( queryParamsStr ? '&' : '' ) + params . QueryString ;
31343134 }
31353135
3136- // 签名加上 Host,避免跨桶访问
3137- var SignHost = '' ;
3138- var standardHost = 'cos.' + params . Region + '.myqcloud.com' ;
3139- if ( ! self . options . ForcePathStyle ) standardHost = params . Bucket + '.' + standardHost ;
3140- var urlHost = url . replace ( / ^ h t t p s ? : \/ \/ ( [ ^ / ] + ) ( \/ .* ) ? $ / , '$1' ) ;
3141- if ( standardHost === urlHost ) SignHost = standardHost ;
3142-
31433136 var syncUrl = url ;
31443137 if ( params . Sign !== undefined && ! params . Sign ) {
31453138 queryParamsStr && ( syncUrl += '?' + queryParamsStr ) ;
31463139 callback ( null , { Url : syncUrl } ) ;
31473140 return syncUrl ;
31483141 }
31493142
3143+ // 签名加上 Host,避免跨桶访问
31503144 var SignHost = getSignHost . call ( this , { Bucket : params . Bucket , Region : params . Region , Url : url } ) ;
31513145 var AuthData = getAuthorizationAsync . call ( this , {
31523146 Action : ( ( params . Method || '' ) . toUpperCase ( ) === 'PUT' ? 'name/cos:PutObject' : 'name/cos:GetObject' ) ,
You can’t perform that action at this time.
0 commit comments