mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 11:16:33 +03:00
Adds SecStatusEngine On/Off switch
Add the possibility to turn the Status Engine On or Off using the directive SecStatusEngine [On/Off]. By default it is On.
This commit is contained in:
@@ -2083,6 +2083,23 @@ static const char *cmd_rule_engine(cmd_parms *cmd, void *_dcfg, const char *p1)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const char *cmd_STATUS_ENGINE(cmd_parms *cmd, void *_dcfg, const char *p1)
|
||||
{
|
||||
if (strcasecmp(p1, "on") == 0) {
|
||||
status_engine_state = STATUS_ENGINE_ENABLED;
|
||||
}
|
||||
else if (strcasecmp(p1, "off") == 0) {
|
||||
status_engine_state = STATUS_ENGINE_DISABLED;
|
||||
}
|
||||
else {
|
||||
return apr_psprintf(cmd->pool, "ModSecurity: Invalid value for " \
|
||||
"SecStatusEngine: %s", p1);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static const char *cmd_rule_inheritance(cmd_parms *cmd, void *_dcfg, int flag)
|
||||
{
|
||||
directory_config *dcfg = (directory_config *)_dcfg;
|
||||
@@ -3297,6 +3314,14 @@ const command_rec module_directives[] = {
|
||||
"On or Off"
|
||||
),
|
||||
|
||||
AP_INIT_TAKE1 (
|
||||
"SecStatusEngine",
|
||||
cmd_status_engine,
|
||||
NULL,
|
||||
CMD_SCOPE_ANY,
|
||||
"On or Off"
|
||||
),
|
||||
|
||||
AP_INIT_TAKE1 (
|
||||
"SecXmlExternalEntity",
|
||||
cmd_xml_external_entity,
|
||||
|
Reference in New Issue
Block a user