diff --git a/config/app.php b/config/app.php index e3daf29ae6..218760e54f 100644 --- a/config/app.php +++ b/config/app.php @@ -1,5 +1,6 @@ [ - - 'App' => Illuminate\Support\Facades\App::class, - 'Arr' => Illuminate\Support\Arr::class, - 'Artisan' => Illuminate\Support\Facades\Artisan::class, - 'Auth' => Illuminate\Support\Facades\Auth::class, - 'Blade' => Illuminate\Support\Facades\Blade::class, - 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, - 'Bus' => Illuminate\Support\Facades\Bus::class, - 'Cache' => Illuminate\Support\Facades\Cache::class, - 'Config' => Illuminate\Support\Facades\Config::class, - 'Cookie' => Illuminate\Support\Facades\Cookie::class, - 'Crypt' => Illuminate\Support\Facades\Crypt::class, - 'Date' => Illuminate\Support\Facades\Date::class, - 'DB' => Illuminate\Support\Facades\DB::class, - 'Eloquent' => Illuminate\Database\Eloquent\Model::class, - 'Event' => Illuminate\Support\Facades\Event::class, - 'File' => Illuminate\Support\Facades\File::class, - 'Gate' => Illuminate\Support\Facades\Gate::class, - 'Hash' => Illuminate\Support\Facades\Hash::class, - 'Http' => Illuminate\Support\Facades\Http::class, - 'Lang' => Illuminate\Support\Facades\Lang::class, - 'Log' => Illuminate\Support\Facades\Log::class, - 'Mail' => Illuminate\Support\Facades\Mail::class, - 'Notification' => Illuminate\Support\Facades\Notification::class, - 'Password' => Illuminate\Support\Facades\Password::class, - 'Queue' => Illuminate\Support\Facades\Queue::class, - 'RateLimiter' => Illuminate\Support\Facades\RateLimiter::class, - 'Redirect' => Illuminate\Support\Facades\Redirect::class, - 'Redis' => Illuminate\Support\Facades\Redis::class, - 'Request' => Illuminate\Support\Facades\Request::class, - 'Response' => Illuminate\Support\Facades\Response::class, - 'Route' => Illuminate\Support\Facades\Route::class, - 'Schema' => Illuminate\Support\Facades\Schema::class, - 'Session' => Illuminate\Support\Facades\Session::class, - 'Storage' => Illuminate\Support\Facades\Storage::class, - 'Str' => Illuminate\Support\Str::class, - 'URL' => Illuminate\Support\Facades\URL::class, - 'Validator' => Illuminate\Support\Facades\Validator::class, - 'View' => Illuminate\Support\Facades\View::class, + 'aliases' => Facade::defaultAliases()->merge([ 'Debugbar' => Barryvdh\Debugbar\Facades\Debugbar::class, + 'DeviceCache' => \App\Facades\DeviceCache::class, 'Flare' => Facade\Ignition\Facades\Flare::class, - - // LibreNMS 'Permissions' => \App\Facades\Permissions::class, 'PluginManager' => \App\Facades\PluginManager::class, - 'DeviceCache' => \App\Facades\DeviceCache::class, + 'Redis' => Illuminate\Support\Facades\Redis::class, 'Rrd' => \App\Facades\Rrd::class, 'SnmpQuery' => \App\Facades\FacadeAccessorSnmp::class, - ], + ])->toArray(), 'charset' => env('CHARSET', ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'), ]; diff --git a/config/auth.php b/config/auth.php index 0cfaa01e6b..a1dce2449b 100644 --- a/config/auth.php +++ b/config/auth.php @@ -1,13 +1,5 @@ env('PUSHER_APP_SECRET'), 'app_id' => env('PUSHER_APP_ID'), 'options' => [ - 'cluster' => env('PUSHER_APP_CLUSTER'), - 'useTLS' => true, + 'host' => env('PUSHER_HOST', 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com', + 'port' => env('PUSHER_PORT', 443), + 'scheme' => env('PUSHER_SCHEME', 'https'), + 'encrypted' => true, + 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https', + ], + 'client_options' => [ + // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html ], ], diff --git a/config/cache.php b/config/cache.php index dd4ccffde6..33bb29546e 100644 --- a/config/cache.php +++ b/config/cache.php @@ -1,13 +1,5 @@ env('CACHE_DRIVER', 'database'), + 'default' => env('CACHE_DRIVER', 'file'), /* |-------------------------------------------------------------------------- @@ -107,12 +99,12 @@ return [ | Cache Key Prefix |-------------------------------------------------------------------------- | - | When utilizing a RAM based store such as APC or Memcached, there might - | be other applications utilizing the same cache. So, we'll specify a - | value to get prefixed to all our keys so we can avoid collisions. + | When utilizing the APC, database, memcached, Redis, or DynamoDB cache + | stores there might be other applications using the same cache. For + | that reason, you may prefix every cache key to avoid collisions. | */ - 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'), + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), ]; diff --git a/config/cors.php b/config/cors.php index 19571ad6aa..8a39e6daa6 100644 --- a/config/cors.php +++ b/config/cors.php @@ -15,44 +15,20 @@ return [ | */ - /* - * You can enable CORS for 1 or multiple paths. - * Example: ['api/*'] - */ - 'paths' => [], + 'paths' => ['api/*', 'sanctum/csrf-cookie'], - /* - * Matches the request method. `[*]` allows all methods. - */ 'allowed_methods' => ['*'], - /* - * Matches the request origin. `[*]` allows all origins. Wildcards can be used, eg `*.mydomain.com` - */ - 'allowed_origins' => [], + 'allowed_origins' => ['*'], - /* - * Patterns that can be used with `preg_match` to match the origin. - */ 'allowed_origins_patterns' => [], - /* - * Sets the Access-Control-Allow-Headers response header. `[*]` allows all headers. - */ 'allowed_headers' => ['*'], - /* - * Sets the Access-Control-Expose-Headers response header with these headers. - */ 'exposed_headers' => [], - /* - * Sets the Access-Control-Max-Age response header when > 0. - */ 'max_age' => 0, - /* - * Sets the Access-Control-Allow-Credentials header. - */ 'supports_credentials' => false, + ]; diff --git a/config/filesystems.php b/config/filesystems.php index d7d8f8fd3a..bbb0db4cb3 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -1,13 +1,5 @@ [ 'driver' => 'local', 'root' => storage_path('app'), + 'throw' => false, ], 'base' => [ @@ -51,8 +44,9 @@ return [ 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), - 'url' => env('APP_URL') . '/storage', + 'url' => env('APP_URL').'/storage', 'visibility' => 'public', + 'throw' => false, ], 's3' => [ @@ -64,6 +58,7 @@ return [ 'url' => env('AWS_URL'), 'endpoint' => env('AWS_ENDPOINT'), 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), + 'throw' => false, ], ], diff --git a/config/hashing.php b/config/hashing.php index c7922679ee..842577087c 100644 --- a/config/hashing.php +++ b/config/hashing.php @@ -1,13 +1,5 @@ env('LOG_CHANNEL', 'stack'), + /* + |-------------------------------------------------------------------------- + | Deprecations Log Channel + |-------------------------------------------------------------------------- + | + | This option controls the log channel that should be used to log warnings + | regarding deprecated PHP and library features. This allows you to get + | your application ready for upcoming major versions of dependencies. + | + */ + + 'deprecations' => [ + 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), + 'trace' => false, + ], + /* |-------------------------------------------------------------------------- | Log Channels @@ -65,14 +73,14 @@ return [ 'driver' => 'single', 'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))), 'formatter' => \App\Logging\NoColorFormatter::class, - 'level' => env('LOG_LEVEL', 'error'), + 'level' => env('LOG_LEVEL', 'debug'), ], 'daily' => [ 'driver' => 'daily', 'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))), 'formatter' => \App\Logging\NoColorFormatter::class, - 'level' => env('LOG_LEVEL', 'error'), + 'level' => env('LOG_LEVEL', 'debug'), 'days' => 14, ], @@ -87,21 +95,22 @@ return [ 'papertrail' => [ 'driver' => 'monolog', 'level' => env('LOG_LEVEL', 'debug'), - 'handler' => SyslogUdpHandler::class, + 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), 'handler_with' => [ 'host' => env('PAPERTRAIL_URL'), 'port' => env('PAPERTRAIL_PORT'), + 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), ], ], 'stderr' => [ 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), 'handler' => StreamHandler::class, - 'formatter' => \App\Logging\CliColorFormatter::class, + 'formatter' => env('LOG_STDERR_FORMATTER'), 'with' => [ 'stream' => 'php://stderr', ], - 'level' => 'debug', ], 'stdout_debug' => [ diff --git a/config/mail.php b/config/mail.php index 4c4019d4bc..534395a369 100644 --- a/config/mail.php +++ b/config/mail.php @@ -1,13 +1,5 @@ env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), 'timeout' => null, - 'auth_mode' => null, + 'local_domain' => env('MAIL_EHLO_DOMAIN'), ], 'ses' => [ @@ -67,7 +59,7 @@ return [ 'sendmail' => [ 'transport' => 'sendmail', - 'path' => '/usr/sbin/sendmail -bs', + 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), ], 'log' => [ diff --git a/config/queue.php b/config/queue.php index b1b5bbb65e..25ea5a8193 100644 --- a/config/queue.php +++ b/config/queue.php @@ -1,13 +1,5 @@ env('MAILGUN_DOMAIN'), 'secret' => env('MAILGUN_SECRET'), 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), + 'scheme' => 'https', ], 'postmark' => [ diff --git a/config/session.php b/config/session.php index 1d8ef58133..f09696cca4 100644 --- a/config/session.php +++ b/config/session.php @@ -1,13 +1,5 @@ env('SESSION_LIFETIME', 34560), + 'lifetime' => env('SESSION_LIFETIME', 120), 'expire_on_close' => false, @@ -80,7 +72,7 @@ return [ | */ - 'connection' => env('SESSION_CONNECTION', null), + 'connection' => env('SESSION_CONNECTION'), /* |-------------------------------------------------------------------------- @@ -108,7 +100,7 @@ return [ | */ - 'store' => env('SESSION_STORE', null), + 'store' => env('SESSION_STORE'), /* |-------------------------------------------------------------------------- @@ -136,7 +128,7 @@ return [ 'cookie' => env( 'SESSION_COOKIE', - Str::slug(env('APP_NAME', 'laravel'), '_') . '_session' + Str::slug(env('APP_NAME', 'laravel'), '_').'_session' ), /* @@ -163,7 +155,7 @@ return [ | */ - 'domain' => env('SESSION_DOMAIN', null), + 'domain' => env('SESSION_DOMAIN'), /* |--------------------------------------------------------------------------