diff --git a/data/web/admin.php b/data/web/admin.php index 5dd7b3c6b..f03e52e76 100644 --- a/data/web/admin.php +++ b/data/web/admin.php @@ -104,7 +104,7 @@ $template_data = [ 'all_domains' => $all_domains, 'mailboxes' => $mailboxes, 'f2b_data' => $f2b_data, - 'f2b_banlist_url' => getBaseUrl() . "/api/v1/get/fail2ban/banlist/" . $f2b_data['banlist_id'], + 'f2b_banlist_url' => getBaseUrl() . "/f2b-banlist?id=" . $f2b_data['banlist_id'], 'q_data' => quarantine('settings'), 'qn_data' => quota_notification('get'), 'pw_reset_data' => reset_password('get_notification'), diff --git a/data/web/f2b-banlist.php b/data/web/f2b-banlist.php new file mode 100644 index 000000000..05c769907 --- /dev/null +++ b/data/web/f2b-banlist.php @@ -0,0 +1,11 @@ +getChallenge(); return; break; - case "fail2ban": - if (!isset($_SESSION['mailcow_cc_role'])){ - switch ($object) { - case 'banlist': - header('Content-Type: text/plain'); - echo fail2ban('banlist', 'get', $extra); - break; - } - } - break; } if (isset($_SESSION['mailcow_cc_role'])) { switch ($category) { @@ -1420,10 +1410,6 @@ if (isset($_GET['query'])) { break; case "fail2ban": switch ($object) { - case 'banlist': - header('Content-Type: text/plain'); - echo fail2ban('banlist', 'get', $extra); - break; default: $data = fail2ban('get'); process_get_return($data); diff --git a/data/web/templates/admin/tab-config-f2b.twig b/data/web/templates/admin/tab-config-f2b.twig index bb4a2e85a..75c626641 100644 --- a/data/web/templates/admin/tab-config-f2b.twig +++ b/data/web/templates/admin/tab-config-f2b.twig @@ -99,7 +99,7 @@ {% endif %}