Skip to content

Commit

Permalink
configuração de offline
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelchavesfreitas committed Dec 26, 2024
1 parent 07d8ed3 commit 2ebabe2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docker/common/config.d/offline.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
$offline = env('OFFLINE', false);

return [
'app.offline' => $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;
}
];

0 comments on commit 2ebabe2

Please sign in to comment.