diff --git a/config/auth.php b/config/auth.php index e8bdb30bdc..4fc626a964 100644 --- a/config/auth.php +++ b/config/auth.php @@ -1,13 +1,5 @@ App\Models\User::class, ], + // 'users' => [ + // 'driver' => 'database', + // 'table' => 'users', + // ], ], /* @@ -102,10 +98,11 @@ return [ 'email' => 'auth.emails.password', 'table' => 'password_resets', 'expire' => env('RESET_PASSWORD_LINK_EXPIRES', 900), - 'throttle' => [ + 'throttle' => 60, 'max_attempts' => env('LOGIN_MAX_ATTEMPTS', 5), + 'lockout_duration' => env('LOGIN_LOCKOUT_DURATION', 60), - ], + ], ], diff --git a/config/broadcasting.php b/config/broadcasting.php index 20512c8cbd..2d529820cc 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -1,13 +1,5 @@ env('BROADCAST_DRIVER', 'pusher'), + 'default' => env('BROADCAST_DRIVER', 'null'), /* |-------------------------------------------------------------------------- @@ -38,14 +32,20 @@ return [ 'pusher' => [ 'driver' => 'pusher', - 'key' => env('PUSHER_KEY'), - 'secret' => env('PUSHER_SECRET'), + 'key' => env('PUSHER_APP_KEY'), + 'secret' => env('PUSHER_APP_SECRET'), 'app_id' => env('PUSHER_APP_ID'), 'options' => [ - // + 'cluster' => env('PUSHER_APP_CLUSTER'), + 'useTLS' => true, ], ], + 'ably' => [ + 'driver' => 'ably', + 'key' => env('ABLY_KEY'), + ], + 'redis' => [ 'driver' => 'redis', 'connection' => 'default', @@ -55,6 +55,10 @@ return [ 'driver' => 'log', ], + 'null' => [ + 'driver' => 'null', + ], + ], ]; diff --git a/config/cache.php b/config/cache.php index d819784051..de0e53401f 100644 --- a/config/cache.php +++ b/config/cache.php @@ -1,12 +1,6 @@ [ @@ -42,12 +39,14 @@ return [ 'array' => [ 'driver' => 'array', + 'serialize' => false, ], 'database' => [ 'driver' => 'database', - 'table' => 'cache', + 'table' => 'cache', 'connection' => null, + 'lock_connection' => null, ], 'file' => [ @@ -56,7 +55,15 @@ return [ ], 'memcached' => [ - 'driver' => 'memcached', + 'driver' => 'memcached', + 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), + 'sasl' => [ + env('MEMCACHED_USERNAME'), + env('MEMCACHED_PASSWORD'), + ], + 'options' => [ + // Memcached::OPT_CONNECT_TIMEOUT => 2000, + ], 'servers' => [ [ 'host' => env('MEMCACHED_HOST', '127.0.0.1'), @@ -69,6 +76,16 @@ return [ 'redis' => [ 'driver' => 'redis', 'connection' => 'default', + 'lock_connection' => 'default', + ], + + 'dynamodb' => [ + 'driver' => 'dynamodb', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), + 'endpoint' => env('DYNAMODB_ENDPOINT'), ], ], @@ -84,6 +101,6 @@ return [ | */ - 'prefix' => env('CACHE_PREFIX', 'snipeit'), + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), ]; diff --git a/config/cors.php b/config/cors.php index 2e3b8c993a..741dd11cea 100644 --- a/config/cors.php +++ b/config/cors.php @@ -1,45 +1,44 @@ false, + + 'allowedOrigins' => $allowed_origins, + + 'allowedHeaders' => ['*'], + + 'allowedMethods' => ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'], + + 'maxAge' => 0, + /* |-------------------------------------------------------------------------- - | Laravel CORS + | Cross-Origin Resource Sharing (CORS) Configuration |-------------------------------------------------------------------------- | - | allowedOrigins, allowedHeaders and allowedMethods can be set to array('*') - | to accept any value. + | Here you may configure your settings for cross-origin resource sharing + | or "CORS". This determines what cross-origin operations may execute + | in web browsers. You are free to adjust these settings as needed. + | + | To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS | */ - 'supportsCredentials' => false, - 'allowedOrigins' => $allowed_origins, - 'allowedOriginsPatterns' => [], - 'allowedHeaders' => ['*'], - 'allowedMethods' => ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'], - 'exposedHeaders' => [], - 'maxAge' => 0, + 'paths' => ['api/*', 'sanctum/csrf-cookie'], + + 'allowed_methods' => ['*'], + + 'allowed_origins' => ['*'], + + 'allowed_origins_patterns' => [], + + 'allowed_headers' => ['*'], + + 'exposed_headers' => [], + + 'max_age' => 0, + + 'supports_credentials' => false, ]; diff --git a/config/filesystems.php b/config/filesystems.php index 2cad75b165..10c9d9be2a 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -1,6 +1,6 @@ env('PRIVATE_FILESYSTEM_DISK', 'local'), - - /* - |-------------------------------------------------------------------------- - | Default Cloud Filesystem Disk - |-------------------------------------------------------------------------- - | - | Many applications store files both locally and in the cloud. For this - | reason, you may specify a default "cloud" driver here. This driver - | will be bound as the Cloud disk implementation in the container. - | - */ - - 'cloud' => env('FILESYSTEM_CLOUD', 's3'), + 'default' => env('FILESYSTEM_DRIVER', 'local'), /* |-------------------------------------------------------------------------- @@ -37,7 +24,7 @@ $config = [ | may even configure multiple disks of the same driver. Defaults have | been setup for each driver as an example of the required options. | - | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace" + | Supported Drivers: "local", "ftp", "sftp", "s3" | */ @@ -45,64 +32,41 @@ $config = [ 'local' => [ 'driver' => 'local', - 'root' => storage_path(), - ], - - // This applies the LOCAL public only, not S3/FTP/etc - 'local_public' => [ - 'driver' => 'local', - 'root' => public_path('uploads'), - 'url' => env('APP_URL').'/uploads', - 'visibility' => 'public', - ], - - 's3_public' => [ - 'driver' => 's3', - 'key' => env('PUBLIC_AWS_ACCESS_KEY_ID'), - 'secret' => env('PUBLIC_AWS_SECRET_ACCESS_KEY'), - 'region' => env('PUBLIC_AWS_DEFAULT_REGION'), - 'bucket' => env('PUBLIC_AWS_BUCKET'), - 'url' => env('PUBLIC_AWS_URL'), - 'root' => env('PUBLIC_AWS_BUCKET_ROOT'), - 'visibility' => 'public', - ], - - 's3_private' => [ - // This bucket (if different than the 's3' bucket above) can be - // configured within AWS to *never* permit public documents - // For security reasons, its best to use separate buckets for - // public and private documents in S3 - 'driver' => 's3', - 'key' => env('PRIVATE_AWS_ACCESS_KEY_ID'), - 'secret' => env('PRIVATE_AWS_SECRET_ACCESS_KEY'), - 'region' => env('PRIVATE_AWS_DEFAULT_REGION'), - 'bucket' => env('PRIVATE_AWS_BUCKET'), - 'url' => env('PRIVATE_AWS_URL'), - 'root' => env('PRIVATE_AWS_BUCKET_ROOT'), - 'visibility' => 'private', - ], - - 'rackspace' => [ - 'driver' => 'rackspace', - 'username' => env('RACKSPACE_USERNAME'), - 'key' => env('RACKSPACE_KEY'), - 'container' => env('RACKSPACE_CONTAINER'), - 'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/', - 'region' => env('RACKSPACE_REGION'), - 'url_type' => env('RACKSPACE_URL_TYPE'), - ], - - 'backup' => [ - 'driver' => env('PRIVATE_FILESYSTEM_DISK', 'local'), 'root' => storage_path('app'), ], + 'public' => [ + 'driver' => 'local', + 'root' => storage_path('app/public'), + 'url' => env('APP_URL').'/storage', + 'visibility' => 'public', + ], + + 's3' => [ + 'driver' => 's3', + 'key' => env('AWS_ACCESS_KEY_ID'), + 'secret' => env('AWS_SECRET_ACCESS_KEY'), + 'region' => env('AWS_DEFAULT_REGION'), + 'bucket' => env('AWS_BUCKET'), + 'url' => env('AWS_URL'), + 'endpoint' => env('AWS_ENDPOINT'), + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Symbolic Links + |-------------------------------------------------------------------------- + | + | Here you may configure the symbolic links that will be created when the + | `storage:link` Artisan command is executed. The array keys should be + | the locations of the links and the values should be their targets. + | + */ + + 'links' => [ + public_path('storage') => storage_path('app/public'), ], ]; - -// copy the selected PUBLIC_FILESYSTEM_DISK's configuration to the 'public' key for easy use -// (by default, the PUBLIC_FILESYSTEM DISK is 'local_public', in the public/uploads directory) -$config['disks']['public'] = $config['disks'][env('PUBLIC_FILESYSTEM_DISK', 'local_public')]; - -return $config; diff --git a/config/logging.php b/config/logging.php index fa0d25d884..1aa06aa30f 100644 --- a/config/logging.php +++ b/config/logging.php @@ -1,8 +1,10 @@ env('LOG_CHANNEL', 'stack'), /* @@ -35,26 +38,20 @@ $config = [ 'stack' => [ 'driver' => 'stack', 'channels' => ['single'], + 'ignore_exceptions' => false, ], 'single' => [ 'driver' => 'single', 'path' => storage_path('logs/laravel.log'), - 'level' => env('APP_LOG_LEVEL', 'error'), + 'level' => env('LOG_LEVEL', 'debug'), ], 'daily' => [ 'driver' => 'daily', 'path' => storage_path('logs/laravel.log'), - 'level' => 'debug', - 'days' => env('APP_LOG_MAX_FILES', 5), - ], - - 'rollbar' => [ - 'driver' => 'monolog', - 'handler' => \Rollbar\Laravel\MonologHandler::class, - 'access_token' => env('ROLLBAR_TOKEN'), - 'level' => env('APP_LOG_LEVEL', 'debug'), + 'level' => env('LOG_LEVEL', 'debug'), + 'days' => 14, ], 'slack' => [ @@ -62,38 +59,47 @@ $config = [ 'url' => env('LOG_SLACK_WEBHOOK_URL'), 'username' => 'Laravel Log', 'emoji' => ':boom:', - 'level' => 'critical', + 'level' => env('LOG_LEVEL', 'critical'), + ], + + 'papertrail' => [ + 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), + 'handler' => SyslogUdpHandler::class, + 'handler_with' => [ + 'host' => env('PAPERTRAIL_URL'), + 'port' => env('PAPERTRAIL_PORT'), + ], ], 'stderr' => [ 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), 'handler' => StreamHandler::class, + 'formatter' => env('LOG_STDERR_FORMATTER'), 'with' => [ 'stream' => 'php://stderr', ], ], - 'stdout' => [ - 'driver' => 'monolog', - 'handler' => StreamHandler::class, - 'with' => ['stream' => 'php://stdout'], - ], - 'syslog' => [ 'driver' => 'syslog', - 'level' => env('APP_LOG_LEVEL', 'error'), + 'level' => env('LOG_LEVEL', 'debug'), ], 'errorlog' => [ 'driver' => 'errorlog', - 'level' => env('APP_LOG_LEVEL', 'error'), + 'level' => env('LOG_LEVEL', 'debug'), + ], + + 'null' => [ + 'driver' => 'monolog', + 'handler' => NullHandler::class, + ], + + 'emergency' => [ + 'path' => storage_path('logs/laravel.log'), ], ], ]; - -if ((env('APP_ENV') == 'production') && env('ROLLBAR_TOKEN')) { - array_push($config['channels']['stack']['channels'], 'rollbar'); -} - -return $config;