Ip Address Access Permission For Api

IP Address access permission for API.

how is done.
Do you have different ideas?

You can change api.php file in the core of CS-Cart installation and add restrictions by IP addresses. E.g.

$allowed_ips = array(
    '111.111.111.111',
    '222.222.222.222',
);

if (!in_array($_SERVER[‘REMOTE_ADDR’], $allowed_ips)) {
exit;
}

(!) Not tested