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>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta http-equiv="refresh" content="3">
|
|
||||||
<title>Update läuft · CluBird</title>
|
<title>Update läuft · CluBird</title>
|
||||||
<style>
|
<style>
|
||||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||||
|
|
@ -86,5 +85,16 @@
|
||||||
<h1>Update wird durchgeführt</h1>
|
<h1>Update wird durchgeführt</h1>
|
||||||
<p>Die Anwendung wird aktualisiert.<br>Diese Seite lädt automatisch neu.</p>
|
<p>Die Anwendung wird aktualisiert.<br>Diese Seite lädt automatisch neu.</p>
|
||||||
</div>
|
</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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ use App\Http\Controllers\UI\Security\SecurityController;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
|
Route::get('/ping', fn() => response('ok', 200))->name('ping');
|
||||||
|
|
||||||
Route::get('/', function () {
|
Route::get('/', function () {
|
||||||
try {
|
try {
|
||||||
$setupDone = \App\Models\Setting::get('setup_completed', '0') === '1';
|
$setupDone = \App\Models\Setting::get('setup_completed', '0') === '1';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue