Fix: 503-Seite lädt nicht mehr blind alle 3s neu, sondern wartet bis /ping antwortet
parent
05cc37271c
commit
5c8a03cc45
|
|
@ -3,7 +3,6 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="refresh" content="3">
|
||||
<title>Update läuft · CluBird</title>
|
||||
<style>
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
|
@ -86,5 +85,16 @@
|
|||
<h1>Update wird durchgeführt</h1>
|
||||
<p>Die Anwendung wird aktualisiert.<br>Diese Seite lädt automatisch neu.</p>
|
||||
</div>
|
||||
<script>
|
||||
(function(){
|
||||
function check(){
|
||||
fetch('/ping',{cache:'no-store'}).then(function(r){
|
||||
if(r.ok) window.location.reload();
|
||||
else setTimeout(check,3000);
|
||||
}).catch(function(){ setTimeout(check,3000); });
|
||||
}
|
||||
setTimeout(check,3000);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ use App\Http\Controllers\UI\Security\SecurityController;
|
|||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('/ping', fn() => response('ok', 200))->name('ping');
|
||||
|
||||
Route::get('/', function () {
|
||||
try {
|
||||
$setupDone = \App\Models\Setting::get('setup_completed', '0') === '1';
|
||||
|
|
|
|||
Loading…
Reference in New Issue