Skip to content

Commit d21f5f3

Browse files
authored
update filter doc (#612)
Signed-off-by: Hermione Dadheech <[email protected]>
1 parent 0d4223f commit d21f5f3

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

versioned_docs/version-3.0.0/running-keploy/configuration-file.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,13 @@ The `record` section in the Keploy-config file allows you to define parameters f
104104

105105
- **`delay`**: Delay in seconds before recording each request. Default is 5 seconds.
106106

107-
- **`filters`**: API calls to the application to avoid recording.
107+
- **`filters`**: API calls to the application to avoid recording. You can also control how these conditions are matched using matchType.
108+
109+
- **`matchType (optional)`**: Determines how urlMethods and headers are evaluated.
110+
111+
- **`"AND"`**: Both must match.
112+
113+
- **`"OR"`**: Either can match.
108114

109115
Example:
110116

@@ -113,11 +119,12 @@ The `record` section in the Keploy-config file allows you to define parameters f
113119
filters:
114120
- path: "/user/app"
115121
urlMethods: ["GET"]
116-
headers: {"^asdf*": "^test"}
122+
headers: {"^x-client-id": "^abc.*"}
117123
host: "dc.services.visualstudio.com"
124+
matchType: "AND"
118125
```
119126
120-
This will avoid recording the API calls to the path `/user/app` with the method `GET`, headers starting with `asdf` and host `dc.services.visualstudio.com`.
127+
This will avoid recording the API calls to the path `/user/app` only when the method is `GET`, headers starting with `abc`.
121128

122129
- **`tests`**: Filters to record Tests.
123130

0 commit comments

Comments
 (0)