WAF (ModSecurity)

Updated Nov 19, 2026 Markdown

PUT /api/v1/accounts/{username}/waf/apps

Choose the account's application exclusion sets

Per CRS application exclusion set: on runs it on every site of the account, off on none, auto (WordPress only) on the sites WordPress is found on. Applications left out keep their choice. The host lists are written at once and tested by the web server that loads the rule set (nginx -t; openlitespeed -t on OpenLiteSpeed) — a refusal puts them back and keeps the previous choice; the web server is reloaded when a list changed.

Path parameters:

Name Type Required Notes
username string yes —

Body fields:

Field Type Required Notes
apps object yes —

Request body example:

JSON
{
  "apps": {}
}

Responses:

Status Schema Description
200 ApiSuccess_WafAccountStatus_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "apps": [
      "..."
    ],
    "effective_mode": "off",
    "mode": "inherit",
    "rule_exclusions": [
      "..."
    ],
    "server_mode": "off",
    "username": "alice",
    "waf_enabled": false
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/accounts/{username}/waf/apps

GET /api/v1/accounts/{username}/waf/audit-log

ModSecurity audit log (account-scope)

The newest audit entries whose Host header names one of the account's own domains, in the same shape as the server-wide log (rule_ids: every rule the entry names).

Path parameters:

Name Type Required Notes
username string yes —

Query parameters:

Name Type Required Notes
limit integer no minimum=1; maximum=1000
offset integer no minimum=0

Responses:

Status Schema Description
200 ApiSuccess_list_WafAuditLogEntry__ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": [
    {
      "action": "...",
      "client_ip": "...",
      "host": "...",
      "request_uri": "...",
      "rule_id": "...",
      "rule_ids": "...",
      "rule_message": "...",
      "severity": "...",
      "timestamp": "..."
    }
  ],
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/waf/audit-log

PUT /api/v1/accounts/{username}/waf/mode

Set the account's WAF mode

inherit follows the server's engine mode; off, detection_only and on set the account's own (its sites only). The account's file is tested by every web server that loads the rule set (nginx -t; openlitespeed -t on OpenLiteSpeed) before it stays, and a refused file is put back; a change reloads the web server, the mode already in force is answered without a write. Answers 409 FEATURE_DISABLED while modsecurity.per_account_overrides is off.

Path parameters:

Name Type Required Notes
username string yes —

Body fields:

Field Type Required Notes
mode string yes enum: inherit, off, detection_only, on

Request body example:

JSON
{
  "mode": "inherit"
}

Responses:

Status Schema Description
200 ApiSuccess_WafAccountStatus_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "apps": [
      "..."
    ],
    "effective_mode": "off",
    "mode": "inherit",
    "rule_exclusions": [
      "..."
    ],
    "server_mode": "off",
    "username": "alice",
    "waf_enabled": false
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/accounts/{username}/waf/mode

GET /api/v1/accounts/{username}/waf/rules

List the account's rule exclusions

The rules excluded for this account's vhosts, each with its optional URI scope.

Path parameters:

Name Type Required Notes
username string yes —

Responses:

Status Schema Description
200 ApiSuccess_list_WafRuleExclusionEntry__ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": [
    {
      "description": "...",
      "rule_id": "...",
      "uri": "..."
    }
  ],
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/waf/rules

POST /api/v1/accounts/{username}/waf/rules/exclude

Exclude a CRS rule for one account

Add an account-scope exclusion — the named rule no longer triggers for this account's vhosts, or, with uri, only on paths that begin with it (a path prefix compared with the decoded, normalised request path; the query string is not part of it, and a uri carrying ? or not starting with / answers 422). The rule must be in the loaded rule set; an exclusion already present is answered without a write. Answers 409 FEATURE_DISABLED while modsecurity.per_account_overrides is off.

Path parameters:

Name Type Required Notes
username string yes —

Body fields:

Field Type Required Notes
description string no —
rule_id integer yes minimum=900000.0; maximum=999999.0
uri string no —

Request body example:

JSON
{
  "description": "string",
  "rule_id": 900000.0,
  "uri": "string"
}

Responses:

Status Schema Description
200 ApiSuccess_WafAccountStatus_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "apps": [
      "..."
    ],
    "effective_mode": "off",
    "mode": "inherit",
    "rule_exclusions": [
      "..."
    ],
    "server_mode": "off",
    "username": "alice",
    "waf_enabled": false
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X POST \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/accounts/{username}/waf/rules/exclude

DELETE /api/v1/accounts/{username}/waf/rules/exclude/{rule_id}

Remove rule exclusion

Removes the exclusion of the rule without a URI scope, or — with uri — the exclusion scoped to that URI. The rule resumes triggering for the account. Answers 409 FEATURE_DISABLED while modsecurity.per_account_overrides is off.

Path parameters:

Name Type Required Notes
username string yes —
rule_id integer yes —

Query parameters:

Name Type Required Notes
uri string no —

Responses:

Status Schema Description
200 ApiSuccess_WafAccountStatus_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "apps": [
      "..."
    ],
    "effective_mode": "off",
    "mode": "inherit",
    "rule_exclusions": [
      "..."
    ],
    "server_mode": "off",
    "username": "alice",
    "waf_enabled": false
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X DELETE \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/waf/rules/exclude/{rule_id}

GET /api/v1/accounts/{username}/waf/status

ModSecurity per-account status

Account-scope: the account's WAF mode (inherit follows the server's engine mode; off, detection_only, on are the account's own), the mode in force on its sites, its rule exclusions and, per CRS application exclusion set (WordPress, Drupal, Nextcloud, DokuWiki, XenForo), the account's choice, the sites WordPress was found on and the host names the set is in force for. An account that does not exist answers 404.

Path parameters:

Name Type Required Notes
username string yes —

Responses:

Status Schema Description
200 ApiSuccess_WafAccountStatus_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "apps": [
      "..."
    ],
    "effective_mode": "off",
    "mode": "inherit",
    "rule_exclusions": [
      "..."
    ],
    "server_mode": "off",
    "username": "alice",
    "waf_enabled": false
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/accounts/{username}/waf/status

PUT /api/v1/accounts/{username}/waf/toggle

Toggle ModSecurity for account

On / off switch over the account's WAF mode: off sets the mode off (the WAF is bypassed for the account's vhosts); on keeps a mode of the account's own and turns an account that is off back to inherit. A change reloads the webserver; the state already in force is answered without a write. Answers 409 FEATURE_DISABLED while modsecurity.per_account_overrides is off.

Path parameters:

Name Type Required Notes
username string yes —

Body fields:

Field Type Required Notes
enabled boolean yes —

Request body example:

JSON
{
  "enabled": false
}

Responses:

Status Schema Description
200 ApiSuccess_WafAccountStatus_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "apps": [
      "..."
    ],
    "effective_mode": "off",
    "mode": "inherit",
    "rule_exclusions": [
      "..."
    ],
    "server_mode": "off",
    "username": "alice",
    "waf_enabled": false
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/accounts/{username}/waf/toggle

GET /api/v1/waf/audit-log

ModSecurity audit log (global)

The newest entries of the ModSecurity audit log (the rotation copies and truncates the file, so the panel reads every entry since the last rotation): the client address, the host and URI asked for, the first rule that matched (rule_id) and every rule the entry names (rule_ids), and whether the request was blocked, detected (detection-only) or only logged. On LiteSpeed Enterprise with its WAF connector on, the rule matches its error log records are listed among them by time (action matched: that log names the site and the request but not whether the request was refused — the account's WAF mode decides; no request body, headers or response).

Query parameters:

Name Type Required Notes
limit integer no minimum=1; maximum=1000
offset integer no minimum=0

Responses:

Status Schema Description
200 ApiSuccess_list_WafAuditLogEntry__ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": [
    {
      "action": "...",
      "client_ip": "...",
      "host": "...",
      "request_uri": "...",
      "rule_id": "...",
      "rule_ids": "...",
      "rule_message": "...",
      "severity": "...",
      "timestamp": "..."
    }
  ],
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/waf/audit-log

PUT /api/v1/waf/config

Update ModSecurity global config

Patch engine mode, paranoia level, audit logging. The rendered files are tested before the values are persisted; a change reloads the webserver, a save that changes nothing does not.

Body fields:

Field Type Required Notes
audit_log boolean no —
crs_paranoia_level integer no —
engine_mode string no —

Request body example:

JSON
{
  "audit_log": false,
  "crs_paranoia_level": 1.0,
  "engine_mode": "string"
}

Responses:

Status Schema Description
200 ApiSuccess_WafGlobalStatus_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "active": false,
    "audit_log": false,
    "connector": "",
    "connector_issue": "...",
    "crs_paranoia_level": 1,
    "disabled_rules": 0,
    "engine_mode": "off",
    "installed": false,
    "owasp_crs": false,
    "rules_loaded": false,
    "total_rules": 0,
    "webserver": "",
    "webserver_supported": true
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/waf/config

GET /api/v1/waf/custom-rules

List custom WAF rules

The custom rules managed from the panel (written together to one generated file of the custom rules folder) and the folder's other .conf files, which are written by hand and only listed.

Responses:

Status Schema Description
200 ApiSuccess_WafCustomRules_ Successful Response

Response example (200):

JSON
{
  "data": {
    "engine_parser": false,
    "files": [
      "..."
    ],
    "generated_file": "string",
    "limits": "...",
    "path": "string",
    "rules": [
      "..."
    ]
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/waf/custom-rules

POST /api/v1/waf/custom-rules

Add a custom WAF rule

Before a rule is kept it is checked: rule directives only (SecRule, SecAction, SecMarker, SecRuleRemoveBy*/SecRuleUpdateTargetBy*/SecRuleUpdateActionById), operators that read nothing outside the request (no file, remote list or outside service), no exec action; the first rule of every chain carries an id outside 10000-19999, 200000-200999, 900000-999999, 9000000-9099999 and 9900000-9999999 that no other rule holds; then the rule engine's parser (where the host has it) and the configuration test of every web server that loads the rule set (nginx, OpenLiteSpeed). A refusal answers 422 WAF_CUSTOM_RULE_INVALID with details.issues (code, message, line and column within the text) and leaves the files as they were; an accepted change reloads the web server. At most 200 rules are kept.

Body fields:

Field Type Required Notes
enabled boolean no default True
name string yes minLength=1; maxLength=80; pattern=^[^\x00-\x1f\x7f]+$
text string yes minLength=1; maxLength=32768

Request body example:

JSON
{
  "enabled": true,
  "name": "string",
  "text": "string"
}

Responses:

Status Schema Description
200 ApiSuccess_WafCustomRule_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "created_at": "",
    "enabled": false,
    "id": "string",
    "name": "string",
    "rule_ids": [
      "..."
    ],
    "text": "string",
    "updated_at": ""
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X POST \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/waf/custom-rules

POST /api/v1/waf/custom-rules/validate

Check a custom WAF rule

Runs the text checks and the rule engine's parser on a rule text without keeping anything; valid false lists the issues. The web servers' configuration test runs when the rule is saved.

Body fields:

Field Type Required Notes
exclude_id string no —
text string yes minLength=1; maxLength=32768

Request body example:

JSON
{
  "exclude_id": "string",
  "text": "string"
}

Responses:

Status Schema Description
200 ApiSuccess_WafCustomRuleValidation_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "issues": [
      "..."
    ],
    "rule_ids": [
      "..."
    ],
    "valid": false
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X POST \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/waf/custom-rules/validate

DELETE /api/v1/waf/custom-rules/{custom_rule_id}

Remove a custom WAF rule

Removes the rule from the generated file; the web servers test the result before it stays. 404 WAF_CUSTOM_RULE_NOT_FOUND for an unknown rule.

Path parameters:

Name Type Required Notes
custom_rule_id string yes pattern=^[a-f0-9]{8}$

Responses:

Status Schema Description
200 ApiSuccess_WafCustomRule_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "created_at": "",
    "enabled": false,
    "id": "string",
    "name": "string",
    "rule_ids": [
      "..."
    ],
    "text": "string",
    "updated_at": ""
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X DELETE \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/waf/custom-rules/{custom_rule_id}

PUT /api/v1/waf/custom-rules/{custom_rule_id}

Change a custom WAF rule

Before a rule is kept it is checked: rule directives only (SecRule, SecAction, SecMarker, SecRuleRemoveBy*/SecRuleUpdateTargetBy*/SecRuleUpdateActionById), operators that read nothing outside the request (no file, remote list or outside service), no exec action; the first rule of every chain carries an id outside 10000-19999, 200000-200999, 900000-999999, 9000000-9099999 and 9900000-9999999 that no other rule holds; then the rule engine's parser (where the host has it) and the configuration test of every web server that loads the rule set (nginx, OpenLiteSpeed). A refusal answers 422 WAF_CUSTOM_RULE_INVALID with details.issues (code, message, line and column within the text) and leaves the files as they were; an accepted change reloads the web server. A rule left as it was is answered without a write; 404 WAF_CUSTOM_RULE_NOT_FOUND for an unknown rule.

Path parameters:

Name Type Required Notes
custom_rule_id string yes pattern=^[a-f0-9]{8}$

Body fields:

Field Type Required Notes
enabled boolean no —
name string no —
text string no —

Request body example:

JSON
{
  "enabled": false,
  "name": "string",
  "text": "string"
}

Responses:

Status Schema Description
200 ApiSuccess_WafCustomRule_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "created_at": "",
    "enabled": false,
    "id": "string",
    "name": "string",
    "rule_ids": [
      "..."
    ],
    "text": "string",
    "updated_at": ""
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/waf/custom-rules/{custom_rule_id}

GET /api/v1/waf/rules

List CRS rules

Every id-bearing rule of the loaded rule set with its message (where it carries one), file and enabled flag.

Responses:

Status Schema Description
200 ApiSuccess_list_WafRuleEntry__ Successful Response

Response example (200):

JSON
{
  "data": [
    {
      "description": "...",
      "enabled": "...",
      "file": "...",
      "rule_id": "..."
    }
  ],
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/waf/rules

PUT /api/v1/waf/rules/{rule_id}

Toggle CRS rule

Enable / disable a single rule by id; an id that is not in the loaded rule set answers 404. A change reloads the webserver, a toggle to the state already in force does not.

Path parameters:

Name Type Required Notes
rule_id integer yes —

Body fields:

Field Type Required Notes
enabled boolean yes —

Request body example:

JSON
{
  "enabled": false
}

Responses:

Status Schema Description
200 ApiSuccess_WafRuleEntry_ Successful Response
422 HTTPValidationError Validation Error

Response example (200):

JSON
{
  "data": {
    "description": "",
    "enabled": true,
    "file": "",
    "rule_id": 0
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X PUT \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  -H "Content-Type: application/json" \
  -d @body.json \
  https://your-server:2000/api/v1/waf/rules/{rule_id}

GET /api/v1/waf/status

ModSecurity global status

Engine state (DetectionOnly / On / Off), CRS version, paranoia level, request body limit.

Responses:

Status Schema Description
200 ApiSuccess_WafGlobalStatus_ Successful Response

Response example (200):

JSON
{
  "data": {
    "active": false,
    "audit_log": false,
    "connector": "",
    "connector_issue": "...",
    "crs_paranoia_level": 1,
    "disabled_rules": 0,
    "engine_mode": "off",
    "installed": false,
    "owasp_crs": false,
    "rules_loaded": false,
    "total_rules": 0,
    "webserver": "",
    "webserver_supported": true
  },
  "message": "",
  "status": "success",
  "warnings": [
    "string"
  ]
}

cURL example:

shell
curl -X GET \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/waf/status

POST /api/v1/waf/test

Test ModSecurity config

Runs the configuration test of every web server that loads the rendered ModSecurity files (nginx -t, apachectl configtest; on OpenLiteSpeed openlitespeed -t, where an [ERROR] line fails it, plus nginx -t when nginx loads the rule set too); no request is sent. Answers 409 WAF_TEST_UNAVAILABLE when no such test applies (LiteSpeed Enterprise while its connector is off, OpenLiteSpeed before its ModSecurity module is installed).

Responses:

Status Schema Description
200 MessageResponse Successful Response

Response example (200):

JSON
{
  "message": "string",
  "status": "success"
}

cURL example:

shell
curl -X POST \
  -H "X-WHost-Key: $WHOST_API_KEY" \
  -H "X-WHost-Timestamp: $(date +%s)" \
  -H "X-WHost-Nonce: $(openssl rand -hex 16)" \
  -H "X-WHost-Signature: $(compute_hmac)" \
  https://your-server:2000/api/v1/waf/test
Still Need Help?

Our support team is here around the clock for anything you can't find above.