Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/vendor
composer.lock
.DS_Store
docs
docs
9 changes: 9 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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