Skip to content

Commit 49bd436

Browse files
committed
fix:CIHost兼容处理
1 parent fa1259a commit 49bd436

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
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.1",
3+
"version": "2.11.2",
44
"description": "cos nodejs sdk v5",
55
"main": "index.js",
66
"types": "index.d.ts",

sdk/util.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -637,10 +637,7 @@ var isWeb = function () {
637637
}
638638

639639
var isCIHost = function(url) {
640-
if (url && url.split('?')[0].match(/(.ci.|ci.|.ci)/g)) {
641-
return true;
642-
}
643-
return false;
640+
return /^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(url);
644641
}
645642

646643
var util = {

0 commit comments

Comments
 (0)