Commit 613b89b7 by 杨昕

百度添加域名模块

parent e0f4c75a
......@@ -87,7 +87,9 @@ class MediaController extends Controller
$data = ["token" => $token,'domain' => $domain];
break;
case self::OSS_BAIDU:
$data = BaiduOssModel::getBaiduOssToken($request);
$token = BaiduOssModel::getBaiduOssToken($request);
$domain = BaiduOssModel::getDomain();
$data = ["token"=>$token,"domain"=>$domain];
break;
default:
$token = QiniuModel::uploadToken($this->bucketList[$branch],$key);
......
......@@ -33,4 +33,19 @@ class BaiduOssModel
return $result["data"];
}
public static function getDomain(){
try{
$branch = getenv('branch') ? getenv('branch') : "test";
if ($branch == "test") {
$domain = "https://media-test-bce.cdn.bcebos.com";
}else{
$domain = "https://media-bce.cdn.bcebos.com";
}
}catch(\Exception $exception){
throw new DatabaseException($exception->getMessage());
}
return domain;
}
}
\ No newline at end of file
......@@ -85,8 +85,8 @@ return [
'mongodb' => [
'driver' => 'mongodb',
'host' => env('mg_host')??'mongo.eoffcn.com',
'port' => env('mg_port')??'28017',
'host' => env('mg_host')??'dds-2ze877d1a56f53141986-pub.mongodb.rds.aliyuncs.com',
'port' => env('mg_port')??'3717',
'database' => 'video_media',
'username' => env('mg_username')??'root',
'password' => env("mg_password")??'FHHTH98AWAPoyweEasdfadfaaf',
......@@ -131,17 +131,17 @@ return [
// 'port' => env('REDIS_PORT', 6379),
// 'database' => env('REDIS_DB', 2),
'host' => 'offcn-redis-svc',
'host' => 'security.proxy.eoffcn.com',
'password' => 'test.eoffcn.com',
'port' => 6379,
'port' => 64793,
'database' => 1,
],
'session' => [
'host' => 'offcn-redis-svc',
'host' => 'security.proxy.eoffcn.com',
'password' => 'test.eoffcn.com',
'port' => 6379,
'port' => 64793,
'database' => 2,
],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment