Skip to content

Commit d0663dc

Browse files
authored
fix: use POST for admin logout route (pterodactyl#3710)
Quick fix for logging out from the admin panel as the auth route was changed from GET to POST.
1 parent 4dca4f0 commit d0663dc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

resources/views/layouts/admin.blade.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,17 @@
195195
cancelButtonColor: '#d33',
196196
confirmButtonText: 'Log out'
197197
}, function () {
198-
window.location = $(that).attr('href');
198+
$.ajax({
199+
type: 'POST',
200+
url: '{{ route('auth.logout') }}',
201+
data: {
202+
_token: '{{ csrf_token() }}'
203+
},complete: function () {
204+
window.location.href = '{{route('auth.login')}}';
205+
}
199206
});
200207
});
208+
});
201209
</script>
202210
@endif
203211

0 commit comments

Comments
 (0)