Modify Request & Response Headers Chrome Extension (Manifest V3)

Overview

Modify request & response headers (Chrome Extension Manifest V3)

This Chrome extension will add request header and response header to few network requests triggered in sample website: https://testheaders.com.

Test environment

Website: https://testheaders.com

There are 2 buttons:

  • Show Request Headers - makes request to /returnHeaders and displays all headers sent in the request.

  • Show Response Headers - makes request to /exampleAPI and displays all headers received in the response.

Problem Statement

  • Add request header x-test-request-header=test-value in first request.

  • Add response header x-test-response-header=test-value in second request.

Solution via Extension

Clone this project:

git clone [email protected]:requestly/modify-headers-mv3-poc.git
cd modify-headers-manifest-v3

Install dependencies:

npm install

Add rules:

Edit src/rules.ts to define headers modifications.

Build:

npm run build

Load extension in browser:

  1. Open chrome://extensions/ in Chrome.
  2. Enable Developer mode.
  3. Click Load unpacked.
  4. Select build folder in this project.

Test:

  1. Open https://testheaders.com.
  2. Click Show Request Headers and should see x-test-request-header=test-value in table.
  3. Click Show Response Headers and should see x-test-response-header=test-value in table.

Using Requestly Chrome/Firefox Extension

If you are looking for an existing solution to modify Request & Response headers, you can use Free Requestly Chrome & Firefox extension. Here's a screenshot of Modify headers rule:

image

You might also like...

An event-driven architecture wrapper for Wechaty that applies the CQS principle by using separate Query and Command messages to retrieve and modify the bot state, respectively.

An event-driven architecture wrapper for Wechaty that applies the CQS principle by using separate Query and Command messages to retrieve and modify the bot state, respectively.

CQRS Wechaty An event-driven architecture wrapper for Wechaty that applies the CQS principle by using separate Query and Command messages to retrieve

Mar 23, 2022

A tool to modify onnx models in a visualization fashion, based on Netron and flask.

A tool to modify onnx models in a visualization fashion, based on Netron and flask.

English | 简体中文 Introduction To edit an ONNX model, One common way is to visualize the model graph, and edit it using ONNX Python API. This works fine.

Jan 4, 2023

A simple task manager that allows that allows users to add, remove and modify tasks from a list.

TO-DO LIST TO-DO LIST is a basic app that allows users to add/remove task from a to-do list. Built With HTML, CSS, JavaScript, Live Demo Live Demo Lin

May 3, 2022

To Do list is a small but useful project to make list app , you can add tasks delete tasks and modify tasks, the project built using HTML, CSS, JavaScript

Project Name The To-Do-List app description this is a project in the second week of the second module in microverse. its a useful to do list that save

Jul 25, 2022

This project will be a basic website that allows users to add/remove books from a list. The main objective is to understand how to use JavaScript objects and arrays and dynamically modify the DOM and add basic events.

Awesome-books Awesome Books This project will be a basic website that allows users to add/remove books from a list. This project is part of the Microv

Oct 3, 2022

Visualize, modify, and build your database with dbSpy! An open-source data modeling tool to facilitate relational database development.

Visualize, modify, and build your database with dbSpy! An open-source data modeling tool to facilitate relational database development.

Visualize, modify, and build your database with dbSpy! dbSpy is an open-source data modeling tool to facilitate relational database development. Key F

Dec 22, 2022

This is a basic app that allows user add/remove books from a list of books. It was created by using JavaScript arrays and objects to dynamically modify the DOM.

Awesome-Books This application lets you compile a dynamic collection of books using JavaScript. It is a single page app. You enter your book title & a

Oct 24, 2022

Eth-explorers-extension - Chrome extension to open Ethereum addresses & transaction hash from any page on popular explorers + dashboards

Eth-explorers-extension - Chrome extension to open Ethereum addresses & transaction hash from any page on popular explorers + dashboards

eth-explorers-extension(s) This repository contains two folders with two extensions that work for address and transactions respectively. 1. eth-addres

Jan 6, 2023

A tool to check for response status codes with ease

A tool to check for response status codes with ease

About Archer Archer is an cross-platform tool developed using Nodejs which focuses on the reconnaissance phase of a penetration test. Got a bunch of l

Oct 19, 2022
Owner
Requestly
Intercept & Modify HTTP(s) Requests. Create Rules to Redirect, Add/Remove Headers, Mock APIs, Inject CSS/JS. Chrome & Firefox Extension 100,000+ active users
Requestly
Chrome Extension Boilerplate with SolidJS + Vite + TypeScript + Manifest V3 + HMR

mv3-solid-chrome-extension-template chrome-extension development template with firebase Support Chrome Extension Manifest V3 SolidJS Typescript HMR Fi

munron 6 Dec 13, 2022
A plugin for Strapi Headless CMS that provides the ability to transform the API request or response.

strapi-plugin-transformer A plugin for Strapi that provides the ability to transform the API request and/or response. Requirements The installation re

daedalus 71 Jan 6, 2023
A lightweight, performant, and simple-to-use wrapper component to stick section headers to the top when scrolling brings them to top

A lightweight, performant, and simple-to-use wrapper component to stick section headers to the top when scrolling brings them to top

Mayank 7 Jun 27, 2022
H1-H5 headers stick on content scroll

"Sticky Headers" plugin for Logseq h1-h5 headers blocks (which have child blocks) on the page will "stick" to the top when the page scrolls, helping y

Yuriy Piskun 13 Dec 15, 2022
A request library that returns promises, inspired by request

then-request A request library that returns promises and supports both browsers and node.js Installation npm install then-request Usage request(metho

then (Promises/A+ implementations) 241 Nov 29, 2022
✏️ A small jQuery extension to turn a static HTML table into an editable one. For quickly populating a small table with JSON data, letting the user modify it with validation, and then getting JSON data back out.

jquery-editable-table A small jQuery extension to turn an HTML table editable for fast data entry and validation Demo ?? https://jsfiddle.net/torrobin

Tor 7 Jul 31, 2022
a vscode extension for http response data auto transform ts type.

Api2ts 这是一个自动将 http 的响应数据转化为 ts 的类型,使用 json-to-ts 做的。 Features 框选配置项后,使用快捷键 alt+Q : 请求参数配置文件 在根目录下创建 Api2ts.config.json 文件,配置项如下: { "baseURL": "http

phy-lei 6 Jun 30, 2022
esbuild plugin to generate mix-manifest.json file compatible with Laravel Mix.

esbuild-mix-manifest-plugin An esbuild plugin to generate a mix-manifest.json compatible with Laravel Mix. Installation You can install the plugin via

Stefan Zweifel 6 Dec 25, 2022
A simple to do list webpage where you can log the daily tasks you have to do, mark them as checked, modify them, reorder them and remove them. Made using HTML, CSS and JavaScript.

To-Do-List This Webpage is for an app called To-Do-List which helps you add, remove or check tasks you have to do. It is a simple web page which conta

Zeeshan Haider 9 Mar 12, 2022
Codism is a Codepen inspired coding playgound that lets you add and modify HTML, CSS and JavaScript

Codism Codism is a Codepen inspired coding playgound that lets you add and modify HTML, CSS and JavaScript to create in order to create cool stuff! Yo

Muhammad Hasnain 5 Nov 24, 2022