Getting Started
Getting Started
Installation
Installation
HTTP Rules (Modify Traffic)
HTTP Rules (Modify Traffic)
Overview
Redirect URL (Map Local, Map Remote)
Replace Strings (Switch Hosts, API Endpoints)
Modify Headers
Modify Request Body
Modify Response Body
Modify Query Params
Modify Cookies
Modify DOM/Inject scripts
Modify User Agents
Delay Request
Cancel Rule
Organizing Rule
Import/Export Rules from File
Pause/Resume Requestly
Rule Operators
Advance Targeting
Sharing Rules
Map Local
Map Remote
Pinning Rules
GraphQL Support
Edit and Replay
Import Setting from Charles Proxy
Test URL Condition
Test this Rule
File Server
File Server
Sessions Replay
Sessions Replay
Getting Started
Getting Started
Installation
Installation
HTTP Rules (Modify Traffic)
HTTP Rules (Modify Traffic)
Overview
Redirect URL (Map Local, Map Remote)
Replace Strings (Switch Hosts, API Endpoints)
Modify Headers
Modify Request Body
Modify Response Body
Modify Query Params
Modify Cookies
Modify DOM/Inject scripts
Modify User Agents
Delay Request
Cancel Rule
Organizing Rule
Import/Export Rules from File
Pause/Resume Requestly
Rule Operators
Advance Targeting
Sharing Rules
Map Local
Map Remote
Pinning Rules
GraphQL Support
Edit and Replay
Import Setting from Charles Proxy
Test URL Condition
Test this Rule
File Server
File Server
Â
Modify Headers
Â
HTTP(s) Headers are key-value pairs that are used to pass additional information with an HTTP(s) request or response. Developers often desire the ability to easily modify the headers of traffic that pass through their browsers.
Requestly provides a simple solution to accomplish this, allowing developers to add new headers, remove existing headers and override existing header values in a few clicks.
- Source Condition: Source condition is where you set criteria for the rules. You can useÂ
URL
,ÂHost
, orÂPath
 withÂRegex
,ÂContains
,ÂWildcard
, orÂEquals
 to match the source request. Learn more about Source Conditions here.
- Request Headers : Select this tab to modify the Request Headers of the Request.
- Response Headers : Select this tab to modify the Response Headers of the Request.
- Header Modification : This is where the header modification will happen. You canÂ
Add
,ÂRemove
, orÂOverride
 the headers.
- Source Filters : You can define better targeting conditions and restrict rules to be applied on specific web pages (or domains), request types, request methods, or request payloads. Learn more about source filters here.
Popular use cases
- Open websites in an iframe for testing: Response headers like X-Frame-Options and Content-Security-Policy don’t allow you to open pages in iframes to prevent clickjacking. Using Requestly, you can modify this header to allow the websites to be opened in an iframe.
- Remove Content-Security-Policy:Â Content-Security-Policy response header is added to the website to prevent injection of external scripts. Requestly can be used to remove the CSP response header for testing purposes.
- Debugging CORS Issues:Â To debug CORS errors in the browser, you can modify response headers likeÂ
Access-Control-Allow-Origin
,ÂAccess-Control-Allow-Methods
,ÂAccess-Control-Allow-Headers
 andÂAccess-Control-Allow-Credentials
.
- Access the Kubernetes dashboard:Â You can access the Kubernetes dashboard by modifying the Authorization header. In order to do that, you need to pass Authorization: BearerÂ
 in every request to Dashboard. You can find more information here.
Â
Modify Headers in Safari: Download the Requestly desktop app to modify headers in safari and other apps.
Â

FAQs
Response Headers not showing in browser network panel
Due to technical constraints, request headers modified using Requestly won't show up in the browser network panel.
But the headers actually received by the server are modified.
You can see the modified headers sent to the server in the Desktop App `Network Traffic` Section
Â
You can check whether the rule is returning correct response header or not using this code in console
fetch("
") .then(data => { console.log(data.headers.get(" "))} )
Â