diff --git a/.env b/.env index 66c367f..0f0fba7 100644 --- a/.env +++ b/.env @@ -18,6 +18,7 @@ PHP_CLI_SERVER_WORKERS=4 BCRYPT_ROUNDS=12 + LOG_CHANNEL=stack LOG_STACK=single LOG_DEPRECATIONS_CHANNEL=null diff --git a/.gitignore b/.gitignore index d2aa430..89636af 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ npm-debug.log yarn-error.log /.idea /.vscode +.env diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 185af59..b773629 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -7,21 +7,14 @@ use Illuminate\Http\Request; class TrustProxies extends Middleware { - /** - * The trusted proxies for this application. - * - * @var array|string - */ - protected $proxies; + // Trust all proxies (simplest for reverse proxy setups) + protected $proxies = '*'; - /** - * The headers that should be used to detect proxies. - * - * @var int - */ - protected $headers = Request::HEADER_X_FORWARDED_FOR | + // Headers to detect HTTPS + protected $headers = + Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB; -} +} \ No newline at end of file