From 0e5bf4cf37f84559ed826840779fc9d566184244 Mon Sep 17 00:00:00 2001 From: jacob Date: Tue, 25 Apr 2017 12:30:03 +0800 Subject: [PATCH] Update AliOssServiceProvider.php --- src/AliOssServiceProvider.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/AliOssServiceProvider.php b/src/AliOssServiceProvider.php index 1d7827a..9e9434a 100644 --- a/src/AliOssServiceProvider.php +++ b/src/AliOssServiceProvider.php @@ -34,13 +34,14 @@ public function boot() $accessId = $config['access_id']; $accessKey = $config['access_key']; $endPoint = $config['endpoint']; - $cdnDomain = $config['cdnDomain']; + $cdnDomain = empty($config['cdnDomain']) ? '' : $config['cdnDomain']; $bucket = $config['bucket']; - $isCname = $config['isCName']; - $debug = $config['debug']; + $ssl = empty($config['ssl']) ? false : $config['ssl']; + $isCname = empty($config['isCName']) ? false : $config['isCName']; + $debug = empty($config['debug']) ? false : $config['debug']; $client = new OssClient($accessId, $accessKey, $endPoint, $isCname); - $adapter = new AliOssAdapter($client, $bucket, $endPoint, $app['request']->secure(), $isCname, $debug, $cdnDomain); + $adapter = new AliOssAdapter($client, $bucket, $endPoint, $ssl, $isCname, $debug, $cdnDomain); //Log::debug($client); $filesystem = new Filesystem($adapter);