File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -3253,17 +3253,16 @@ function getUrl(params) {
32533253
32543254var getSignHost = function ( opt ) {
32553255 if ( ! opt . Bucket || ! opt . Bucket ) return '' ;
3256- var ps = this . options . ForcePathStyle ;
32573256 var url = opt . Url || getUrl ( {
3258- ForcePathStyle : ps ,
3257+ ForcePathStyle : this . options . ForcePathStyle ,
32593258 protocol : this . options . Protocol ,
32603259 domain : this . options . Domain ,
32613260 bucket : opt . Bucket ,
32623261 region : opt . Region ,
32633262 } ) ;
3264- var standardHost = ( ps ? '' : opt . Bucket + '.' ) + 'cos.' + opt . Region + '.myqcloud.com' ;
32653263 var urlHost = url . replace ( / ^ h t t p s ? : \/ \/ ( [ ^ / ] + ) ( \/ .* ) ? $ / , '$1' ) ;
3266- if ( standardHost === urlHost ) return standardHost ;
3264+ var standardHostReg = new RegExp ( '^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$' ) ;
3265+ if ( standardHostReg . test ( urlHost ) ) return urlHost ;
32673266 return '' ;
32683267}
32693268
You can’t perform that action at this time.
0 commit comments