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...]
Parameters | Description | Detailed Documentation |
---|---|---|
pattern | Expression to match request URLs | Match Pattern Documentation |
value | Rule content, supports the following types: • Directory/File Path • Remote URL • Inline/Embedded/Values Content | Operation Instruction Documentation |
filters | Optional 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).
Related Protocols
- Request-Phone Script Rules: reqScript
- Response-Phone Batch Rules: reqRules
- Response-Phone Script Rules: resScript
- More Complex Customization Requirements: Plugin Development