Skip to content

Commit

Permalink
Merge pull request #94 from mmubasharsheikh/patch-for-pem-certificate
Browse files Browse the repository at this point in the history
Updated AWS3provider and added option to add pem certificate while cr…
  • Loading branch information
Mulkave committed May 27, 2016
2 parents 0a56299 + e6f971b commit c92b281
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,4 +1,4 @@
/vendor
composer.lock
.DS_Store
docs
docs
9 changes: 9 additions & 0 deletions readme.md
Expand Up @@ -81,6 +81,7 @@ You can find it at `config/cdn.php`
'version' => 'latest',
'region' => '',


'buckets' => [
'my-backup-bucket' => '*',
]
Expand Down Expand Up @@ -138,6 +139,14 @@ Set the CDN URL:
'url' => 'https://s3.amazonaws.com',
```

##### HTTP

Set the HTTP parameters:

```php
'http' => '['verify' => path-to-your-pem-certificate-file]',
```

##### Bypass

To load your LOCAL assets for testing or during development, set the `bypass` option to `true`:
Expand Down
3 changes: 3 additions & 0 deletions src/Vinelab/Cdn/Providers/AwsS3Provider.php
Expand Up @@ -28,6 +28,7 @@
* @property string $acl
* @property string $cloudfront
* @property string $cloudfront_url
* @property string $http
*
* @author Mahmoud Zalt <mahmoud@vinelab.com>
*/
Expand All @@ -48,6 +49,7 @@ class AwsS3Provider extends Provider implements ProviderInterface
'version' => null,
'region' => null,
'buckets' => null,
'http' => null,
'acl' => 'public-read',
'cloudfront' => [
'use' => false,
Expand Down Expand Up @@ -158,6 +160,7 @@ public function connect()
$this->setS3Client(new S3Client([
'version' => $this->supplier['version'],
'region' => $this->supplier['region'],
'http' => $this->supplier['http']
]
)
);
Expand Down
11 changes: 11 additions & 0 deletions src/config/cdn.php
Expand Up @@ -54,6 +54,17 @@
*/
'threshold' => 10,

/*
|--------------------------------------------------------------------------
| HTTP Parameters
|--------------------------------------------------------------------------
|
| Set your HTTP parameters.
| Add you .pem certificate to your request.
|
*/
'http' => [],

/*
|--------------------------------------------------------------------------
| CDN Supported Providers
Expand Down

0 comments on commit c92b281

Please sign in to comment.