Match and replace rules

Match and replace rules enable you to automatically replace parts of HTTP and WebSocket messages as they pass through the proxy. You can configure and enable these in the Proxy > Match and replace tab. They can used for a variety of tasks, such as adjusting headers, rewriting content, or modifying authentication tokens automatically in real-time.

Match and replace rules are listed in the HTTP match and replace rules and WebSocket match and replace rules tables. Burp executes enabled match and replace rules in turn for each message, making any applicable replacements. To change the order in which rules are applied, reorder them using the Up and Down buttons.

To only apply match and replace rules to items that are in the project scope, select Only apply to in-scope items. For more information on how to set a scope for your work, see Scope settings - Target scope.

Adding match and replace rules

You can configure match and replace rules in two different ways:

When adding or editing a HTTP match and replace rule, you can test your rule using the built-in test function. For more information, see Testing HTTP match and replace rules.