You can modify the response of replay data by performing pattern-based replacement of text. For example, response modifications can be used to prevent the unwanted execution of JavaScripts referenced or included in the response.
Note: If your web application includes data that is delivered from a third party, that content must be associated with a specific request. You can use dynamic response modification rules to modify response patterns that are based on the detection of Tealeaf events in the transaction stream.
- In the Edit Profile dialog, double-click the ResponseMod node.
- For the specified host name, you can select whether the response modification is to be applied to all responses or to those matching a regular expression pattern.
Note: Regular expressions are a powerful mechanism for specifying pattern matching.
- In the Pattern text box, you can specify by using a regular expression the text for which to search the response.
- In the Replacement text box, specify the text to replace the matched pattern.
- Select whether to replace only the first occurrence or all occurrences.
- To save your response modification rule, click OK.
After you specify your response modification rule, you must test it against sample data.