How to modify HTTP(s) Request & Response Headers in Chrome, Firefox & Safari using Requestly
Tags: proxy, chromeextension, developer, debugging
Published: 2021-06-11 12:55:26

---
title: How to modify HTTP(s) Request & Response Headers in Chrome, Firefox & Safari using Requestly
published: true
date: 2021-06-11 12:46:34 UTC
tags: proxy,chromeextension,developer,debugging
canonical_url: https://requestly.medium.com/how-to-modify-http-s-request-response-headers-in-chrome-firefox-safari-using-requestly-c1cd33610658
---

![](https://cdn-images-1.medium.com/max/1024/1*jSnaaufv_3oeLa9OrgVxrA.png)<figcaption>Modify HTTP(s) Headers using Requestly</figcaption>

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 certain headers to minimize online tracking, remove CSP while testing, test sites in production and so on.

Using Requestly, Headers can be added/modified by a simple series of clicks. All you need is to install [Requestly](https://requestly.com/) extension in your browser.

Modify Headers could be selected after clicking on **New Rule button.**

![](https://cdn-images-1.medium.com/max/1024/0*m1oIqVc0gP_czyEw)<figcaption>Screenshot — New Rule Selection</figcaption>

Select if you want to modify request header or response header and give a suitable name and description to the rule.

### Remove Content-Security-Policy Response Header (Example)

#### Step 1. Select Header Type —  **Request Headers** or **Response Headers**

![](https://cdn-images-1.medium.com/max/1024/0*uxehrDdo-QifRph6)<figcaption>Removing Content Security Policy header on example.com</figcaption>

#### Step 2. Select Operation — Add/Remove/Modify

You can add a new header or remove, modify an existing request/response header. For this example, we will select Remove.

![](https://cdn-images-1.medium.com/max/1024/0*c3Bfn3U5n0AaXvQT)<figcaption>Removing Content Security Policy header on example.com</figcaption>

> **Difference between Add and Modify option**

> Add operation works when a new header is to be added to the request/response whereas modify option modifies an already existing header.

#### Step 3. URL Targeting — Specify when Modify Headers rule should apply

You can apply the rules based on URL, hostname or path. You can also use regex to match it.

![](https://cdn-images-1.medium.com/max/1024/0*ALzQWPg1qZWCJXI3)<figcaption>URL Targeting — Apply the Rule when URL Contains example.com</figcaption>

### More Examples

- [Remove X-Frame-Options header to open the site in Iframe](https://medium.com/requestly-docs/how-to-open-a-website-in-iframe-using-requestly-11aa52367cd)

If you haven’t installed [Requestly](https://requestly.com/) yet, please install it to modify request and response headers. Reach out to contact@requestly.io for any questions.

Content from this article is taken from [https://developers.requestly.io/http-rules/modify-headers/](https://developers.requestly.io/http-rules/modify-headers/)