DEV Community

Requestly
Requestly

Posted on • Originally published at requestly.Medium on

How to modify HTTP(s) Request & Response Headers in Chrome, Firefox & Safari using Requestly

Modify HTTP(s) Headers using Requestly

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 extension in your browser.

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

Screenshot — New Rule Selection

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

Removing Content Security Policy header on example.com

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.

Removing Content Security Policy header on example.com

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.

URL Targeting — Apply the Rule when URL Contains example.com

More Examples

If you haven’t installed Requestly 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/

Neon image

Serverless Postgres in 300ms (!)

10 free databases with autoscaling, scale-to-zero, and read replicas. Start building without infrastructure headaches. No credit card needed.

Try for Free →

Top comments (0)

ACI image

ACI.dev: The Only MCP Server Your AI Agents Need

ACI.dev’s open-source tool-use platform and Unified MCP Server turns 600+ functions into two simple MCP tools on one server—search and execute. Comes with multi-tenant auth and natural-language permission scopes. 100% open-source under Apache 2.0.

Star our GitHub!

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, cherished by the supportive DEV Community. Coders of every background are encouraged to bring their perspectives and bolster our collective wisdom.

A sincere “thank you” often brightens someone’s day—share yours in the comments below!

On DEV, the act of sharing knowledge eases our journey and forges stronger community ties. Found value in this? A quick thank-you to the author can make a world of difference.

Okay