Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
460d58a57a | ||
|
|
9c1e291886 |
No files matched your search
@@ -1 +1,3 @@
|
||||
/vendor/
|
||||
.composer
|
||||
.bash_history
|
||||
Generated
+5243
-361
File diff suppressed because it is too large.
Load diff
+14
-1
@@ -9,9 +9,22 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'core' => [
|
||||
'core' => [
|
||||
// Add credentials for authentication to CloudObjects:
|
||||
'auth_ns' => env('CO_NAMESPACE'),
|
||||
'auth_secret' => env('CO_CORE_AUTH_SECRET'),
|
||||
|
||||
// The following options can usually be left at their defaults:
|
||||
'cache_prefix' => env('CO_CACHE_PREFIX', 'clobj:'),
|
||||
'cache_ttl' => env('CO_CACHE_TTL', 60),
|
||||
'static_object_directory' => env('CO_STATIC_OBJECT_DIRECTORY'),
|
||||
'api_base_url' => env('CO_API_BASE_URL'),
|
||||
'timeout' => env('CO_TIMEOUT', 20),
|
||||
'connect_timeout' => env('CO_CONNECT_TIMEOUT', 5),
|
||||
'fallback_store_directory' => env('CO_FALLBACK_STORE_DIRECTORY'),
|
||||
'fallback_store_scope' => env('CO_FALLBACK_STORE_SCOPE'),
|
||||
'permanent_store_directory' => env('CO_PERMANENT_STORE_DIRECTORY'),
|
||||
'permanent_store_scope' => env('CO_PERMANENT_STORE_SCOPE'),
|
||||
],
|
||||
|
||||
];
|
||||
@@ -21,9 +21,20 @@ class CloudObjectsServiceProvider extends ServiceProvider {
|
||||
|
||||
public function register() {
|
||||
$this->app->bind(ObjectRetriever::class, function() {
|
||||
$config = Arr::only($this->app['config']->get('cloudobjects.core'),
|
||||
[ 'auth_ns', 'auth_secret' ]
|
||||
);
|
||||
$config = Arr::only($this->app['config']->get('cloudobjects.core'), [
|
||||
'auth_ns',
|
||||
'auth_secret',
|
||||
'cache_prefix',
|
||||
'cache_ttl',
|
||||
'static_object_directory',
|
||||
'api_base_url',
|
||||
'timeout',
|
||||
'connect_timeout',
|
||||
'fallback_store_directory',
|
||||
'fallback_store_scope',
|
||||
'permanent_store_directory',
|
||||
'permanent_store_scope',
|
||||
]);
|
||||
$config['cache_storage'] = $this->app['cache.store'];
|
||||
$retriever = new ObjectRetriever($config);
|
||||
$retriever->setLogger($this->app['log']);
|
||||
|
||||
Reference in new issue
Block a user