mirror of
https://github.com/SubleXBle/Fail2Ban-Report.git
synced 2026-02-11 11:18:49 -06:00
Update action-collector.js
This commit is contained in:
@@ -10,12 +10,15 @@ function collectAndExecuteActions(ip, jail = '') {
|
||||
selectedActions.forEach(action => {
|
||||
const scriptUrl = `/includes/actions/action_${action}-ip.php`;
|
||||
|
||||
const params = { ip };
|
||||
if (jail) params.jail = jail;
|
||||
|
||||
fetch(scriptUrl, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: new URLSearchParams({ ip, jail })
|
||||
body: new URLSearchParams(params)
|
||||
})
|
||||
.then(res => res.text())
|
||||
.then(responseText => {
|
||||
|
||||
Reference in New Issue
Block a user