Fix: 419 Session-Fehler leitet direkt zum Login weiter statt Livewire-Dialog
parent
eeae972d8b
commit
97cc0091c0
|
|
@ -226,14 +226,18 @@
|
|||
@livewireScripts
|
||||
@livewire('wire-elements-modal')
|
||||
<script>
|
||||
// 503 (Wartungsmodus) → sofortiger Page-Reload statt Livewire-Fehlerdialog
|
||||
// 503 (Wartungsmodus) → Reload | 419 (Session abgelaufen) → Login
|
||||
;(function () {
|
||||
var _fetch = window.fetch
|
||||
window.fetch = function () {
|
||||
return _fetch.apply(this, arguments).then(function (resp) {
|
||||
if (resp.status === 503) {
|
||||
window.location.reload()
|
||||
return new Promise(function () {}) // Livewire-Chain abbrechen
|
||||
return new Promise(function () {})
|
||||
}
|
||||
if (resp.status === 419) {
|
||||
window.location.href = '{{ route('login') }}'
|
||||
return new Promise(function () {})
|
||||
}
|
||||
return resp
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue