UNIQUE_ID

Description: Unique request identifier

Syntax: UNIQUE_ID

UNIQUE_ID contains a unique identifier generated by WGE for each request. This ID is used in logs to correlate multiple records from the same request, facilitating post-incident analysis and debugging. Can be referenced in the msg action via %{UNIQUE_ID} to track specific requests.

Example:

# Log the request ID
SecRule ARGS "@detectSQLi" \
    "id:1067,phase:2,deny,msg:'[%{UNIQUE_ID}] SQL injection attack'"