From 2ebabe2fcc94e9f6abfa47aa4282a5e03eb02751 Mon Sep 17 00:00:00 2001 From: Rafa Chaves Date: Thu, 26 Dec 2024 16:44:53 -0300 Subject: [PATCH] =?UTF-8?q?configura=C3=A7=C3=A3o=20de=20offline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/common/config.d/offline.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 docker/common/config.d/offline.php diff --git a/docker/common/config.d/offline.php b/docker/common/config.d/offline.php new file mode 100644 index 0000000..861c1ee --- /dev/null +++ b/docker/common/config.d/offline.php @@ -0,0 +1,17 @@ + $offline && date('Y-m-d H:i:s') < env('OFFLINE_UNTIL', '2024-12-26 00:00:00'), + 'app.offlineUrl' => '/mantenimiento.php', + 'app.offlineBypassFunction' => function() { + $senha = $_GET['online'] ?? ''; + + if ($senha === env('OFFLINE_BYPASS')) { + $_SESSION['online'] = true; + } + + return $_SESSION['online'] ?? false; + } +]; +