Header Patch is a small Manifest V3 extension for Chrome and Edge that sets or overwrites request headers. Rules are saved locally and applied immediately.
- Set request headers for HTTP and HTTPS resources.
- Enable or pause individual rules or all rules at once.
- Validate header names and resolve duplicates predictably: the later rule wins.
- Show the number of active rules in the popup and toolbar badge.
- Follow the browser language automatically with English and Simplified Chinese UI.
- Store all configuration in the browser without analytics or a remote service.
Requirements: Node.js 20.19 or newer and npm.
npm ci
npm run verifyThen open chrome://extensions or edge://extensions, enable developer mode, choose Load unpacked, and select the generated dist directory.
For a ready-to-install archive, download the ZIP from the project's GitHub Releases page, extract it, and load the extracted directory.
npm run devThe regular web preview uses localStorage. Request headers are modified only when the project is loaded as a browser extension.
Run all static checks, unit tests, and the production build:
npm run verifyRun the isolated browser regression after building:
npm run test:e2eThe browser test starts its own localhost server and isolated Chrome or Edge profiles. Set BROWSER_PATH when the browser executable is not in a standard location. It never needs an external test site.
Header Patch requests storage, declarativeNetRequestWithHostAccess, and <all_urls> host access. Broad host access is required because user-defined request-header rules may target any HTTP or HTTPS page the user visits. The extension does not include telemetry, analytics, or remote API calls.
Header values can contain sensitive information. Add only values you understand and trust, and remove rules when they are no longer needed. See PRIVACY.md for details.
src/contains the popup, state, validation, storage, and background worker code.public/contains the Manifest, locale catalogs, and runtime icons.assets/icon.svgis the editable icon source.tests/contains unit, build, localization, and isolated browser tests.
