Skip to content

Commit

Permalink
change how anon clients are specified
Browse files Browse the repository at this point in the history
  • Loading branch information
jszobody committed Jan 25, 2021
1 parent 1208613 commit f4d74db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('ZIPSTREAM_AWS_PATH_STYLE_ENDPOINT', false),
'region' => env('ZIPSTREAM_AWS_REGION', env('AWS_DEFAULT_REGION', 'us-east-1'))
]
],

// https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials_anonymous.html
'aws_anonymous_client' => env('AWS_ANONYMOUS', false)
];
4 changes: 4 additions & 0 deletions src/ZipStreamServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ public function register()
$config = $app['config']->get('zipstream.aws');

if(!count(array_filter($config['credentials']))) {
unset($config['credentials']);
}

if($config['aws_anonymous_client']) {
$config['credentials'] = false;
}

Expand Down

0 comments on commit f4d74db

Please sign in to comment.