Fix: 503-Seite lädt nicht mehr blind alle 3s neu, sondern wartet bis /ping antwortet

main v1.1.434
boban 2026-04-27 06:21:56 +02:00
parent 05cc37271c
commit 5c8a03cc45
2 changed files with 13 additions and 1 deletions

View File

@ -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>

View File

@ -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';