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.
whmapi1 --output=jsonpretty \ modsec_discard_rule_changes \ config='modsec2.example.conf'
{- "data": { },
- "metadata": {
- "command": "modsec_discard_rule_changes",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}