Skip to content

Commit 191cedc

Browse files
authored
Merge pull request #228 from tencentyun/feature_jojoliang_dc35f253
update cos-website
2 parents 4284b43 + 18a2f2d commit 191cedc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cos.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var (
4343
hostPrefix = regexp.MustCompile(`^(http://|https://){0,1}([a-z0-9-]+-[0-9]+\.){0,1}((cos|cos-internal|cos-website|ci)\.[a-z-1]+|file)\.(myqcloud\.com|tencentcos\.cn).*$`)
4444
invalidBucketErr = fmt.Errorf("invalid bucket format, please check your cos.BaseURL")
4545

46-
switchHost = regexp.MustCompile(`([a-z0-9-]+-[0-9]+\.)((cos|cos-website)\.[a-z-1]+)\.(myqcloud\.com)(:[0-9]+){0,1}$`)
46+
switchHost = regexp.MustCompile(`([a-z0-9-]+-[0-9]+\.)(cos\.[a-z-1]+)\.(myqcloud\.com)(:[0-9]+){0,1}$`)
4747
accelerateDomainSuffix = "accelerate.myqcloud.com"
4848
oldDomainSuffix = ".myqcloud.com"
4949
newDomainSuffix = ".tencentcos.cn"

cos_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ func Test_SwitchHost(t *testing.T) {
218218

219219
u, _ = url.Parse("https://example-125000000.cos-website.ap-chengdu.myqcloud.com:443/123")
220220
res = toSwitchHost(u)
221-
want = "https://example-125000000.cos-website.ap-chengdu.tencentcos.cn:443/123"
221+
want = "https://example-125000000.cos-website.ap-chengdu.myqcloud.com:443/123"
222222
if res.String() != want {
223223
t.Errorf("toSwitchHost failed, expect: %v, res: %v", want, res.String())
224224
}

0 commit comments

Comments
 (0)