Skip to content

Commit

Permalink
fix the rs, rsf https domains for different regions
Browse files Browse the repository at this point in the history
  • Loading branch information
jemygraw committed May 18, 2018
1 parent 9ff58d9 commit 305ce1c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 7.2.6 (2018-05-18)
* 修复rs,rsf在不同机房默认的https域名

## 7.2.5 (2018-05-10)
* 修复表单上传中多余的参数checkCrc导致的fname错位问题

Expand Down
40 changes: 20 additions & 20 deletions src/Qiniu/Zone.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public static function zone0()
$Zone_z0 = new Zone(
array("up.qiniup.com", 'up-jjh.qiniup.com', 'up-xs.qiniup.com'),
array('upload.qiniup.com', 'upload-jjh.qiniup.com', 'upload-xs.qiniup.com'),
'rs.qiniu.com',
'rsf.qiniu.com',
'rs.qbox.me',
'rsf.qbox.me',
'api.qiniu.com',
'iovip.qbox.me'
);
Expand All @@ -58,8 +58,8 @@ public static function zone1()
$Zone_z1 = new Zone(
array('up-z1.qiniup.com'),
array('upload-z1.qiniup.com'),
"rs-z1.qiniu.com",
"rsf-z1.qiniu.com",
"rs-z1.qbox.me",
"rsf-z1.qbox.me",
"api-z1.qiniu.com",
"iovip-z1.qbox.me"
);
Expand All @@ -73,8 +73,8 @@ public static function zone2()
$Zone_z2 = new Zone(
array('up-z2.qiniup.com', 'up-dg.qiniup.com', 'up-fs.qiniup.com'),
array('upload-z2.qiniup.com', 'upload-dg.qiniup.com', 'upload-fs.qiniup.com'),
"rs-z2.qiniu.com",
"rsf-z2.qiniu.com",
"rs-z2.qbox.me",
"rsf-z2.qbox.me",
"api-z2.qiniu.com",
"iovip-z2.qbox.me"
);
Expand All @@ -88,8 +88,8 @@ public static function zoneNa0()
$Zone_na0 = new Zone(
array('up-na0.qiniup.com'),
array('upload-na0.qiniup.com'),
"rs-na0.qiniu.com",
"rsf-na0.qiniu.com",
"rs-na0.qbox.me",
"rsf-na0.qbox.me",
"api-na0.qiniu.com",
"iovip-na0.qbox.me"
);
Expand All @@ -103,8 +103,8 @@ public static function zoneAs0()
$Zone_as0 = new Zone(
array('up-as0.qiniup.com'),
array('upload-as0.qiniup.com'),
"rs-as0.qiniu.com",
"rsf-as0.qiniu.com",
"rs-as0.qbox.me",
"rsf-as0.qbox.me",
"api-as0.qiniu.com",
"iovip-as0.qbox.me"
);
Expand Down Expand Up @@ -145,24 +145,24 @@ public static function queryZone($ak, $bucket)

//set specific hosts
if (strstr($zone->iovipHost, "z1") !== false) {
$zone->rsHost = "rs-z1.qiniu.com";
$zone->rsfHost = "rsf-z1.qiniu.com";
$zone->rsHost = "rs-z1.qbox.me";
$zone->rsfHost = "rsf-z1.qbox.me";
$zone->apiHost = "api-z1.qiniu.com";
} elseif (strstr($zone->iovipHost, "z2") !== false) {
$zone->rsHost = "rs-z2.qiniu.com";
$zone->rsfHost = "rsf-z2.qiniu.com";
$zone->rsHost = "rs-z2.qbox.me";
$zone->rsfHost = "rsf-z2.qbox.me";
$zone->apiHost = "api-z2.qiniu.com";
} elseif (strstr($zone->iovipHost, "na0") !== false) {
$zone->rsHost = "rs-na0.qiniu.com";
$zone->rsfHost = "rsf-na0.qiniu.com";
$zone->rsHost = "rs-na0.qbox.me";
$zone->rsfHost = "rsf-na0.qbox.me";
$zone->apiHost = "api-na0.qiniu.com";
} elseif (strstr($zone->iovipHost, "as0") !== false) {
$zone->rsHost = "rs-as0.qiniu.com";
$zone->rsfHost = "rsf-as0.qiniu.com";
$zone->rsHost = "rs-as0.qbox.me";
$zone->rsfHost = "rsf-as0.qbox.me";
$zone->apiHost = "api-as0.qiniu.com";
} else {
$zone->rsHost = "rs.qiniu.com";
$zone->rsfHost = "rsf.qiniu.com";
$zone->rsHost = "rs.qbox.me";
$zone->rsfHost = "rsf.qbox.me";
$zone->apiHost = "api.qiniu.com";
}

Expand Down

0 comments on commit 305ce1c

Please sign in to comment.