This Chrome extension will add request header and response header to few network requests triggered in sample website: https://testheaders.com.
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.
-
Add request header
x-test-request-header=test-value
in first request. -
Add response header
x-test-response-header=test-value
in second request.
git clone git@github.com:requestly/modify-headers-mv3-poc.git
cd modify-headers-manifest-v3
npm install
Edit src/rules.ts
to define headers modifications.
npm run build
- Open chrome://extensions/ in Chrome.
- Enable
Developer mode
. - Click
Load unpacked
. - Select
build
folder in this project.
- Open https://testheaders.com.
- Click
Show Request Headers
and should seex-test-request-header=test-value
in table. - Click
Show Response Headers
and should seex-test-response-header=test-value
in table.
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: