Skip to content

Commit

Permalink
Merge pull request #260 from ankadada/master
Browse files Browse the repository at this point in the history
Update Zone.php
  • Loading branch information
jemygraw authored Feb 20, 2018
2 parents d098889 + cff2ec3 commit 28e51bd
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Qiniu/Zone.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,21 @@ public static function zoneNa0()
return $Zone_na0;
}

//新加坡机房
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",
"api-as0.qiniu.com",
"iovip-as0.qbox.me"
);
return $Zone_as0;
}

/*
* GET /v2/query?ak=<ak>&&bucket=<bucket>
**/
Expand Down Expand Up @@ -140,6 +155,10 @@ public static function queryZone($ak, $bucket)
$zone->rsHost = "rs-na0.qiniu.com";
$zone->rsfHost = "rsf-na0.qiniu.com";
$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->apiHost = "api-as0.qiniu.com";
} else {
$zone->rsHost = "rs.qiniu.com";
$zone->rsfHost = "rsf.qiniu.com";
Expand Down

0 comments on commit 28e51bd

Please sign in to comment.