Skip to content

Commit c92b281

Browse files
committed
Merge pull request #94 from mmubasharsheikh/patch-for-pem-certificate
Updated AWS3provider and added option to add pem certificate while cr…
2 parents 0a56299 + e6f971b commit c92b281

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/vendor
22
composer.lock
33
.DS_Store
4-
docs
4+
docs

readme.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ You can find it at `config/cdn.php`
8181
'version' => 'latest',
8282
'region' => '',
8383

84+
8485
'buckets' => [
8586
'my-backup-bucket' => '*',
8687
]
@@ -138,6 +139,14 @@ Set the CDN URL:
138139
'url' => 'https://s3.amazonaws.com',
139140
```
140141

142+
##### HTTP
143+
144+
Set the HTTP parameters:
145+
146+
```php
147+
'http' => '['verify' => path-to-your-pem-certificate-file]',
148+
```
149+
141150
##### Bypass
142151

143152
To load your LOCAL assets for testing or during development, set the `bypass` option to `true`:

src/Vinelab/Cdn/Providers/AwsS3Provider.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* @property string $acl
2929
* @property string $cloudfront
3030
* @property string $cloudfront_url
31+
* @property string $http
3132
*
3233
* @author Mahmoud Zalt <[email protected]>
3334
*/
@@ -48,6 +49,7 @@ class AwsS3Provider extends Provider implements ProviderInterface
4849
'version' => null,
4950
'region' => null,
5051
'buckets' => null,
52+
'http' => null,
5153
'acl' => 'public-read',
5254
'cloudfront' => [
5355
'use' => false,
@@ -158,6 +160,7 @@ public function connect()
158160
$this->setS3Client(new S3Client([
159161
'version' => $this->supplier['version'],
160162
'region' => $this->supplier['region'],
163+
'http' => $this->supplier['http']
161164
]
162165
)
163166
);

src/config/cdn.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@
5454
*/
5555
'threshold' => 10,
5656

57+
/*
58+
|--------------------------------------------------------------------------
59+
| HTTP Parameters
60+
|--------------------------------------------------------------------------
61+
|
62+
| Set your HTTP parameters.
63+
| Add you .pem certificate to your request.
64+
|
65+
*/
66+
'http' => [],
67+
5768
/*
5869
|--------------------------------------------------------------------------
5970
| CDN Supported Providers

0 commit comments

Comments
 (0)