mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-05-14 11:25:12 +00:00
fix: add X-Requested-With header to zombie-recover and radio-offline-clear fetch calls
Both banner action buttons were posting without the required X-Requested-With header, causing the CSRF guard to return 403.
This commit is contained in:
@@ -488,7 +488,7 @@
|
||||
btn.innerHTML = '<i class="fas fa-spinner fa-spin me-1"></i>Restarting\u2026';
|
||||
fetch('/api/admin/zombie-recover', {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
headers: {'Content-Type': 'application/json', 'X-Requested-With': 'XMLHttpRequest'}
|
||||
})
|
||||
.then(function(r) { return r.json(); })
|
||||
.then(function(data) {
|
||||
@@ -544,7 +544,7 @@
|
||||
btn.innerHTML = '<i class="fas fa-spinner fa-spin me-1"></i>Clearing\u2026';
|
||||
fetch('/api/admin/radio-offline-clear', {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/json'}
|
||||
headers: {'Content-Type': 'application/json', 'X-Requested-With': 'XMLHttpRequest'}
|
||||
})
|
||||
.then(function(r) { return r.json(); })
|
||||
.then(function(data) {
|
||||
|
||||
Reference in New Issue
Block a user