[Help] XML-RPC attack

How do I block XML-RPC attack in OpenLitespeed server? In nginx, I used to put this in nginx configuration file

if ($http_user_agent ~ WordPress) { return 444; }

Is there an OpenLitespeed alternative to drop connections from Wordpress useragent?

<“Files xmlrpc.php”>
order deny,allow
deny from all
<"/Files >

on .htaccess (remove the “” on the code)

I think he mean “how to disable on server level” but not in htaccess