ModSecurity
Rule Settings
Remove staged ModSecurity rule changes
This function discards staged rule changes for a ModSecurity™ configuration file. Staged rule changes reside in a .STAGE file (for example, the staged changes for the example.conf file exist in the example.conf.STAGE file). This function deletes the .STAGE file that corresponds to the configuration file that you specify.
Note:
To stage rule changes, call WHM API 1's modsec_add_rule function.
Important:
When you disable the Web Server role, the system disables this function.
get/modsec_discard_rule_changes
Query parameters
configstring required
Example:modsec2.example.conf
The ModSecurity configuration file in the /usr/local/cpanel/apache/conf/ directory.
Response
HTTP Request was successful.
Example response
{
"metadata": {
"command": "modsec_discard_rule_changes",
"reason": "OK",
"result": 1,
"version": 1
}
}