docs/en/docs/rules/ua.md
A shortcut protocol for modifying the User-Agent field in the request header. This can be used to simulate access from various machines.
pattern ua://value [filters...]
| Parameters | Description | Detailed Documentation |
|---|---|---|
| pattern | Expression to match request URLs | Match Pattern Documentation |
| value | Custom request User-Agent string | |
| • Inline/Embedded/Values content | ||
| ⚠️ Loading data from files/remote URLs is not supported | ||
| filters | Optional filters, supports matching: | |
| • Request URL/Method/Headers/Content | ||
| • Response Status Code/Headers | Filter Documentation |
# Change the original user-agent to `Whistle/2.9.100`
www.example.com/path ua://Whistle/2.9.100
# Spaces UA
``` ua.txt
Test Whistle/2.9.100
```
www.example.com/path ua://{ua.txt}
# Using reqHeaders
``` ua.json
user-agent: Test Whistle/2.9.100
```
www.example.com/path reqHeaders://{ua.json}