From 42f898af4defbef22ab5a9119a9d17fb27faf9c0 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 7 Apr 2023 11:59:34 +0200 Subject: [PATCH] wip #5851 --- .docker/config/cron/host | 1 + .docker/images/php-dev/Dockerfile | 4 ---- .docker/images/php-dev/startup | 2 +- app/Console/Kernel.php | 2 +- app/Http/Middleware/TrustProxies.php | 7 ++++++- auth.json | 8 ++++++++ 6 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 auth.json diff --git a/.docker/config/cron/host b/.docker/config/cron/host index 979810b61..973efaa07 100644 --- a/.docker/config/cron/host +++ b/.docker/config/cron/host @@ -1 +1,2 @@ 3 4 * * * root /docker/fluidbook-toolbox/build >/dev/null 2>/dev/null +3 5 * * * root /docker/fluidbook-toolbox-dev/build >/dev/null 2>/dev/null diff --git a/.docker/images/php-dev/Dockerfile b/.docker/images/php-dev/Dockerfile index a25b4db83..b99ac1993 100644 --- a/.docker/images/php-dev/Dockerfile +++ b/.docker/images/php-dev/Dockerfile @@ -1,7 +1,3 @@ -############################################ -# PHPDocker.io PHP 8.1 / CLI and FPM image # -############################################ - FROM ubuntu:latest AS cli WORKDIR "/application" diff --git a/.docker/images/php-dev/startup b/.docker/images/php-dev/startup index 494a93bd6..3dc58488c 100644 --- a/.docker/images/php-dev/startup +++ b/.docker/images/php-dev/startup @@ -36,4 +36,4 @@ chmod -R 700 /etc/monit;chown -R root:root /etc/monit;/usr/bin/monit chown -R root:root /etc/monit && /usr/bin/monit # Launch PHP -/usr/sbin/php-fpm8.1 -O +/usr/sbin/php-fpm8.2 -O diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 8176b3767..e3f1e496e 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -29,7 +29,7 @@ class Kernel extends \Cubist\Backpack\Console\Kernel // $schedule->command('backup:clean')->daily()->at('04:00'); // $schedule->command('backup:run')->daily()->at('05:00'); - if (config('env') !== 'production') { + if (config('env') === 'production') { $schedule->command('job:dispatchNow Maintenance\\\\CleanDownloads')->dailyAt('4:00'); $schedule->command('job:dispatchNow Maintenance\\\\CleanFTP')->dailyAt('4:30'); $schedule->command('ws:migrate --publications=v2 --documents=missing')->dailyAt('1:00'); diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index ee5b5958e..ce930a200 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -19,5 +19,10 @@ class TrustProxies extends Middleware * * @var int */ - protected $headers = Request::HEADER_X_FORWARDED_ALL; + 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; } diff --git a/auth.json b/auth.json new file mode 100644 index 000000000..54bf14a78 --- /dev/null +++ b/auth.json @@ -0,0 +1,8 @@ +{ + "http-basic": { + "backpackforlaravel.com": { + "username": "cubedesigners23627297", + "password": "m4iLNaqzuFer" + } + } +} -- 2.39.5