IncomingHttpRequestFilter lua script

Hi would like to ask help on IncomingHttpRequestFilter
currently i have disabled the delete if the request is not made by the localhost on the script below.
would like to ask the method on anonymize and send and how to disable it? Thanks!

function IncomingHttpRequestFilter(method, uri, ip, username, httpHeaders)
– Only allow DELETE action from localhost/127.0.0.1
if(ip ~= ‘localhost’ and ip ~= ‘127.0.0.1’)
then if (uri == ‘/app/explorer.html’)
then return true;
else if (method == “DELETE”)
then return false;
else return true;
end
end
else
return true;
end

end

Check out the REST API:
http://book.orthanc-server.com/users/rest.html

http://book.orthanc-server.com/users/anonymization.html

=> If you want to block anonymization, you would e.g. block “uri” whose pattern matches pattern “/[^/]/[^/]/anonymize”:
http://lua-users.org/wiki/PatternsTutorial