Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/requestly/modify-headers-manifest-v3
Modify Request & Response Headers Chrome Extension (Manifest V3)
https://github.com/requestly/modify-headers-manifest-v3
chrome-extension developer-tool firefox google-chrome http-headers requestly
Last synced: about 1 month ago
JSON representation
Modify Request & Response Headers Chrome Extension (Manifest V3)
- Host: GitHub
- URL: https://github.com/requestly/modify-headers-manifest-v3
- Owner: requestly
- License: apache-2.0
- Created: 2022-10-10T08:34:09.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-23T00:30:14.000Z (5 months ago)
- Last Synced: 2024-09-30T17:01:29.277Z (about 1 month ago)
- Topics: chrome-extension, developer-tool, firefox, google-chrome, http-headers, requestly
- Language: JavaScript
- Homepage:
- Size: 82 KB
- Stars: 55
- Watchers: 4
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.comThere 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:
```sh
git clone [email protected]:requestly/modify-headers-mv3-poc.git
cd modify-headers-manifest-v3
```### Install dependencies:
```sh
npm install
```### Add rules:
Edit `src/rules.ts` to define headers modifications.### Build:
```sh
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](https://requestly.io). Here's a screenshot of Modify headers rule:
![image](https://user-images.githubusercontent.com/3108399/194862734-2b34b682-fc69-4090-9cdd-39e061c65eed.png)