| trafficparrot.virtualservice.ungzipBeforeWritingToDisk |
true |
Controls whether gzipped responses are uncompressed before saving to disk during recording.
Impact: When enabled, makes recorded traffic files more readable but may increase disk usage.
|
| trafficparrot.virtualservice.enableRedirectHandling |
false |
Enables automatic following of HTTP redirects during recording.
Use Case: When enabled, Traffic Parrot will follow redirect chains automatically during proxy recording.
See Handling HTTP redirects during recording for the full behaviour and a comparison of the enabled and disabled modes.
|
| trafficparrot.virtualservice.recordOnlyContentTypesContaining |
TP_RECORD_ALL_ CONTENT_TYPES |
Filters recording to only capture specific content types.
Default: TP_RECORD_ALL_CONTENT_TYPES (special value meaning record all)
Example: application/javascript,application/xml to record only JS and XML content
|
| trafficparrot.http.recording.response.rewrite.regex |
|
Regex patterns applied to response bodies during recording, rewriting the content as the client sees it before it is matched and saved.
Format: pattern->replacement,pattern2->replacement2
Example: https://api\.example\.com->http://localhost:8081 rewrites a production host to your local simulator host.
Use Case: Transform production URLs to test environment URLs in recorded responses. Paired with trafficparrot.http.recording.storage.rewrite.regex for the on-disk transformation.
A malformed rule stops Traffic Parrot from starting, naming the rule at fault. A rule that was dropped instead would be discovered only by finding the un-rewritten value in a recording.
|
| trafficparrot.http.recording.storage.rewrite.regex |
|
Regex patterns applied when saving response bodies to disk during recording. Unlike the response rewrite, this transformation is intended to preserve Handlebars templates, so it typically runs in the opposite direction.
This property applies to the response body only. To rewrite recorded request bodies, use trafficparrot.http.recording.request.storage.rewrite.regex below.
Format: pattern->replacement,pattern2->replacement2
Example: http://localhost:8081->http://{{request.requestLine.host}} stores a templated host so the saved mapping replays against whatever host the request arrives on.
Use Case: Keep recorded files environment-agnostic by templating host-specific values as they are written to disk.
A malformed rule stops Traffic Parrot from starting, naming the rule at fault, as for trafficparrot.http.recording.response.rewrite.regex.
|
| trafficparrot.http.recording.request.storage.rewrite.regex |
|
Regex patterns applied when saving request bodies to disk during recording. Empty by default, so nothing is rewritten unless you configure it.
Format: pattern->replacement,pattern2->replacement2
Example: ("apiKey"\\s*:\\s*")[^"]*->$1***REDACTED*** replaces the value of a JSON apiKey field with a placeholder, so the real key is never written to a traffic file. The per-request entry in the log shows the rewritten body too, whether or not a recording is running. The backslashes are doubled because trafficparrot.properties is a Java properties file, in which a single \s or \d is read as a bare s or d.
Use Case: Keep credentials, tokens and personal data out of recorded traffic files.
This changes the saved request matcher. The recorded request body is what the matcher is built from, so a replay client sending the real value will no longer match the saved stub. See Rewriting request bodies during recording for the two ways to handle that, and for which content types are covered.
A malformed rule stops Traffic Parrot from starting, naming the rule at fault. This property exists to keep values out of recordings, so a rule that cannot be parsed must not be skipped silently.
|
| trafficparrot.http.recording.redaction.enabled |
false |
Masks credential headers in what recording saves to disk: the recorded response headers, and the request headers recording matches on. Takes true or false; any other value stops Traffic Parrot from starting.
While it is on, Authorization, Cookie, Set-Cookie and Proxy-Authorization are always covered, plus any header named in trafficparrot.http.recording.redaction.headers. The client recording through Traffic Parrot still receives the backend's real headers, and a mapping created in the web user interface or through the admin API is saved as written.
A request header is saved only if it is listed in Record request headers for matching on the Record page, and it is the saved matcher that is redacted: under PLACEHOLDER it expects the placeholder, so a replayed request carrying the real value no longer matches; under DROP the header is not matched at all. See Redacting credential headers during recording for what is and is not covered.
The per-request entry in the log shows the request and response headers of each exchange redacted the same way, whether or not a recording is running. The URL, and the body unless trafficparrot.http.recording.request.storage.rewrite.regex is set, are logged as received.
Set it in trafficparrot.properties, or as a -D system property or a key=value argument to the start script; an override applies whether or not the file holds the key. The same holds for the three properties below.
|
| trafficparrot.http.recording.redaction.strategy |
PLACEHOLDER |
What redaction does to a covered header. PLACEHOLDER keeps the header and replaces its value with trafficparrot.http.recording.redaction.placeholder; DROP leaves the header out of the saved mapping altogether. Any other value stops Traffic Parrot from starting.
Use Case: Choose DROP when replay clients send the real credential, because a request matcher that expects the placeholder no longer matches them; choose PLACEHOLDER to keep a visible record in the mapping that the header was there.
|
| trafficparrot.http.recording.redaction.placeholder |
***REDACTED*** |
The value written in place of a covered header's value under the PLACEHOLDER strategy, in the recorded response headers and in the saved request matcher alike.
|
| trafficparrot.http.recording.redaction.headers |
|
Header names to redact in addition to Authorization, Cookie, Set-Cookie and Proxy-Authorization, separated by commas or spaces and matched without regard to case. Empty by default. An entry that is not a header name stops Traffic Parrot from starting.
Example: X-Api-Key, X-Session-Token
|
| trafficparrot.http.recording.response.inlineJson |
false |
Sets the default state of the Keep valid-JSON response body inline checkbox in the Advanced parameters section of the HTTP Record page.
Impact: When the checkbox is ticked for a recording session, a response body that is valid JSON served with a text content type is kept inline in the mapping (as a structured jsonBody) instead of being written to a separate __files/ body file; non-JSON and binary bodies are still externalised. There is no size limit, so a very large JSON response is embedded directly in the mapping file.
This property only seeds the checkbox's initial state; the checkbox on the Record page overrides it for that session.
See Keeping JSON response bodies inline for the full behaviour.
|
| trafficparrot.http.recording.request.externaliseToFile |
false |
Sets the default state of the Externalise request body to file checkbox in the Advanced parameters section of the HTTP Record page.
Impact: When the checkbox is ticked for a recording session, a recorded request body is written to a separate __files/ file and the mapping's request matcher references it by bodyFileName (using equalToJson, equalToXml, binaryEqualTo or equalTo according to the content type) instead of being stored inline as a bodyPatterns value. Empty and multipart request bodies are always kept inline.
This property only seeds the checkbox's initial state; the checkbox on the Record page overrides it for that session.
See Externalising request bodies to files for the full behaviour.
|
| trafficparrot.virtualservice.gzipHttpResponseEnabled |
true |
Enables/disables gzip compression of HTTP responses from the simulator (virtual service/mock).
Performance: Reduces bandwidth usage but increases CPU usage for compression.
|