How to modify HTTP Headers in Chrome, Firefox, Edge & Safari browsers?
Sagar Soni
December 27, 2023
1MIN READ
HTTP(s) Headers are key-value pairs that the client or server can use to pass additional information along with an HTTP(s) request or response.
Headers carry data about the data being transferred. The ability to modify the headers of traffic that pass through your browser easily is what every developer would want to have.
Use cases
By modifying headers, developers can manipulate the behavior of web servers and clients, enabling advanced functionalities and enhanced browsing experiences. Some of the examples follow:
- Use Requestly to open websites in the iframe for testing. Find more details here.
- Use Requestly to remove Content-Security-Policy header.
- Use Requestly to access the Kubernetes dashboard by modifying the Authorization header. Find more details here.
- Use Requestly to change the
Content-Type
of the requested resource. - Use Requestly to test sites in production by bypassing CORS issues. Find more details here.
- Use Requestly to add custom request headers.
How to modify HTTP headers using Requestly
- Install the Requestly browser extension and click on New Rule in the Top-Right.
- Next, Select the Modify Headers Rule from the list of rules. This should navigate you to the rule editor.
- Define for which requests you want the modifications to be made.
eg: If you want to bypass CORS for
production.com/api
- Select
Response
headers to override the headers - Save the rule.
Test if the headers are modified on the configured site.
Response Headers modification done by Requestly are not visible in Browsers devtool but they are actually modified.
Sagar Soni
Sagar is the co-founder and CTO of Requestly. When he’s not busy architecting the next big thing in software development, you’ll likely find him behind the wheel, cruising the streets and enjoying the thrill of the drive. For Sagar, it’s all about the code by day and the open road by night.
Contents​
Subscribe for latest updates​
Share this article
Related posts
Our journey to finding Product-Market Fit
Sachin Jain
December 5, 2024
How Blockthrough uses Requestly to seamlessly test their JS on publisher websites
Sagar Soni
December 4, 2024
The Best Open Source API Mocking Tool for developers (With examples)
Anmol Baranwal
December 2, 2024