diff --git a/.env.example b/.env.example index 91ba58f..ec44a12 100644 --- a/.env.example +++ b/.env.example @@ -2,9 +2,10 @@ APP_NAME=Laravel APP_ENV=local APP_KEY= APP_DEBUG=true -APP_LOG_LEVEL=debug APP_URL=http://localhost +LOG_CHANNEL=stack + DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 @@ -32,3 +33,7 @@ MAIL_ENCRYPTION=null PUSHER_APP_ID= PUSHER_APP_KEY= PUSHER_APP_SECRET= +PUSHER_APP_CLUSTER=mt1 + +MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" +MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 93bf68b..74b1cbd 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -54,6 +54,7 @@ class Kernel extends HttpKernel 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, + 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index ef1c00d..3ce0214 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -15,15 +15,9 @@ class TrustProxies extends Middleware protected $proxies; /** - * The current proxy header mappings. + * The headers that should be used to detect proxies. * - * @var array + * @var string */ - protected $headers = [ - Request::HEADER_FORWARDED => 'FORWARDED', - Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR', - Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST', - Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT', - Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO', - ]; + protected $headers = Request::HEADER_X_FORWARDED_ALL; } diff --git a/composer.json b/composer.json index dcb4cd3..6e33f09 100644 --- a/composer.json +++ b/composer.json @@ -1,20 +1,24 @@ { "name": "laravel/laravel", "description": "The Laravel Framework.", - "keywords": ["framework", "laravel"], + "keywords": [ + "framework", + "laravel" + ], "license": "MIT", "type": "project", "require": { - "php": ">=7.0.0", - "fideloper/proxy": "~3.3", - "laravel/framework": "5.5.*", + "php": ">=7.1.3", + "fideloper/proxy": "~4.0", + "laravel/framework": "dev-develop", "laravel/tinker": "~1.0" }, "require-dev": { "filp/whoops": "~2.0", "fzaninotto/faker": "~1.4", "mockery/mockery": "~1.0", - "phpunit/phpunit": "~6.0" + "phpunit/phpunit": "~6.0", + "nunomaduro/collision": "~1.1" }, "autoload": { "classmap": [ @@ -32,8 +36,7 @@ }, "extra": { "laravel": { - "dont-discover": [ - ] + "dont-discover": [] } }, "scripts": { @@ -53,4 +56,4 @@ "sort-packages": true, "optimize-autoloader": true } -} +} \ No newline at end of file diff --git a/config/app.php b/config/app.php index 0e4ebed..b16e7f7 100644 --- a/config/app.php +++ b/config/app.php @@ -108,23 +108,6 @@ 'cipher' => 'AES-256-CBC', - /* - |-------------------------------------------------------------------------- - | Logging Configuration - |-------------------------------------------------------------------------- - | - | Here you may configure the log settings for your application. Out of - | the box, Laravel uses the Monolog PHP logging library. This gives - | you a variety of powerful log handlers / formatters to utilize. - | - | Available Settings: "single", "daily", "syslog", "errorlog" - | - */ - - 'log' => env('APP_LOG', 'single'), - - 'log_level' => env('APP_LOG_LEVEL', 'debug'), - /* |-------------------------------------------------------------------------- | Autoloaded Service Providers diff --git a/config/broadcasting.php b/config/broadcasting.php index 5eecd2b..3ca45ea 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -36,7 +36,8 @@ 'secret' => env('PUSHER_APP_SECRET'), 'app_id' => env('PUSHER_APP_ID'), 'options' => [ - // + 'cluster' => env('PUSHER_APP_CLUSTER'), + 'encrypted' => true, ], ], diff --git a/config/filesystems.php b/config/filesystems.php index 9568e02..67158a5 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -61,6 +61,7 @@ 'secret' => env('AWS_SECRET_ACCESS_KEY'), 'region' => env('AWS_DEFAULT_REGION'), 'bucket' => env('AWS_BUCKET'), + 'url' => env('AWS_URL'), ], ], diff --git a/config/hashing.php b/config/hashing.php new file mode 100644 index 0000000..f929cf0 --- /dev/null +++ b/config/hashing.php @@ -0,0 +1,20 @@ + 'bcrypt', + +]; diff --git a/config/logging.php b/config/logging.php new file mode 100644 index 0000000..902efaf --- /dev/null +++ b/config/logging.php @@ -0,0 +1,70 @@ + env('LOG_CHANNEL', 'stack'), + + /* + |-------------------------------------------------------------------------- + | Log Channels + |-------------------------------------------------------------------------- + | + | Here you may configure the log channels for your application. Out of + | the box, Laravel uses the Monolog PHP logging library. This gives + | you a variety of powerful log handlers / formatters to utilize. + | + | Available Drivers: "single", "daily", "slack", "syslog", + | "errorlog", "custom", "stack" + | + */ + + 'channels' => [ + 'stack' => [ + 'driver' => 'stack', + 'channels' => ['single'], + ], + + 'single' => [ + 'driver' => 'single', + 'path' => storage_path('logs/laravel.log'), + 'level' => 'debug', + ], + + 'daily' => [ + 'driver' => 'daily', + 'path' => storage_path('logs/laravel.log'), + 'level' => 'debug', + 'days' => 7, + ], + + 'slack' => [ + 'driver' => 'slack', + 'url' => env('LOG_SLACK_WEBHOOK_URL'), + 'username' => 'Laravel Log', + 'emoji' => ':boom:', + 'level' => 'critical', + ], + + 'syslog' => [ + 'driver' => 'syslog', + 'level' => 'debug', + ], + + 'errorlog' => [ + 'driver' => 'errorlog', + 'level' => 'debug', + ], + ], + +]; diff --git a/config/queue.php b/config/queue.php index 4d83ebd..87b1b1b 100644 --- a/config/queue.php +++ b/config/queue.php @@ -50,11 +50,11 @@ 'sqs' => [ 'driver' => 'sqs', - 'key' => 'your-public-key', - 'secret' => 'your-secret-key', - 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', - 'queue' => 'your-queue-name', - 'region' => 'us-east-1', + 'key' => env('SQS_KEY', 'your-public-key'), + 'secret' => env('SQS_SECRET', 'your-secret-key'), + 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), + 'queue' => env('SQS_QUEUE', 'your-queue-name'), + 'region' => env('SQS_REGION', 'us-east-1'), ], 'redis' => [ @@ -62,6 +62,7 @@ 'connection' => 'default', 'queue' => 'default', 'retry_after' => 90, + 'block_for' => null, ], ], diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php index 547152f..ff133fb 100644 --- a/tests/CreatesApplication.php +++ b/tests/CreatesApplication.php @@ -2,6 +2,7 @@ namespace Tests; +use Illuminate\Support\Facades\Hash; use Illuminate\Contracts\Console\Kernel; trait CreatesApplication @@ -17,6 +18,8 @@ public function createApplication() $app->make(Kernel::class)->bootstrap(); + Hash::driver('bcrypt')->setRounds(4); + return $app; } }