Skip to content

resRules

Batch set multiple rules for matching requests during the response phase to meet request processing requirements in complex scenarios.

Rule Syntax

txt
pattern resRules://value [filters...]
ParametersDescriptionDetailed Documentation
patternExpression to match request URLsMatch Pattern Documentation
valueRule content, supports the following types:
• Directory/File Path
• Remote URL
• Inline/Embedded/Values Content
Operation Instruction Documentation
filtersOptional filters, supports matching:
• Request URL/Method/Header/Content
• Response Status Code/Header
Filter Documentation

Configuration Example

txt
``` test.txt
* file://(<div>hello<div>)
* resType://text
```

``` test2.txt
* resAppend://(test)
```

www.example.com/path resRules://{test.txt} resRules://{test2.txt}

Accessing https://www.example.com/path/to does not execute * file://(<div>hello<div>) (because the rules in resRules are executed during the response phase).

  1. Request-Phone Script Rules: reqScript
  2. Response-Phone Batch Rules: reqRules
  3. Response-Phone Script Rules: resScript
  4. More Complex Customization Requirements: Plugin Development