Skip to content

mod_tag

Introduction

mod_tag sets tags for requests based on defined rules.

Module Configuration

Description

conf/mod_tag/mod_tag.conf

Config Item Description
Basic.DataPath String
Path of rule configuration
Log.OpenDebug Boolean
Debug flag of module

Example

[Basic]
DataPath = mod_tag/tag_rule.data

[Log]
OpenDebug = true

Rule Configuration

Description

conf/mod_tag/tag_rule.data

Config Item Description
Version String
Version of the config file
Config Object
Tag rules for each product
Config{k} String
Product name
Config{v} Object
A list of tag rules
Config{v}[] Object
A tag rule
Config{v}[].Cond String
Condition expression, See Condition
Config{v}[].Param.TagName String
Tag name
Config{v}[].Param.TagValue String
Tag value
Config{v}[].Last Boolean
If true, stop to check the remaining rules

Example

{
  "Version": "20200218210000",
  "Config": {
    "example_product": [
      {
        "Cond": "req_host_in(\"example.org\")",
        "Param": {
          "TagName": "tag",
          "TagValue": "bfe"
        },
        "Last": false
      }
    ]
  }
}