Modify HTTP(s) Request & Response Headers
Modify Headers is a commonly used Requestly Rule. This rule allows users to Add, Replace and Modify HTTP(s) headers.
HTTP(s) Headers are key-value pairs that can be used by the client or the server to pass additional information along with an HTTP(s) request or response. An HTTP(s) header consists of its case-insensitive name followed by a colon (:), then by its value.
The ability to modify the headers of traffic that passes through your browser is a great tool to have. You can delete headers to minimize online tracking, remove CSP while testing, test sites in production and so on.
Modify Headers could be selected after clicking on New Rule button.
Select Modify Headers Rule
Select if you want to modify request header or response header and give a suitable name and description to the rule.
Removing Content Security Policy header on example.com
You can add a new header or remove, modify an existing request/response header. For this example, we will select Remove.
Removing Content Security Policy Response Header
Add operation works when a new header is to be added to the request/response whereas modify option modifies an already existing header.
You can apply the rules based on URL, hostname or path. You can also use regex to match it.
URL Targeting - Apply the Rule when URL Contains example.com