This extension allows users to control request headers that will be embedded in all requests in Chrome Browser, where each override contains the following properties:
- Header: Header key.
- Header Value: The value associated with the header key.
Header overrides are managed in a Chrome extension popup (a simple react app), stored in Chrome local storage, and applied to upstream page requests using the updateDynamicRules function of chrome's declarativeNetRequest dynamic request rules.
For local Firefox builds, set the FIREFOX_EXTENSION_ID environment variable:
FIREFOX_EXTENSION_ID=your-extension-id@example.com pnpm run build:firefoxNote: This variable is not needed for GitHub Actions builds as it's automatically set from secrets.
You can get a test build for each pull-request in its comments. Example.
For E2E tests, always import the test fixtures:
import { expect, test } from './fixtures';Before running E2E tests for the first time, install the required browsers:
pnpm exec playwright installRun E2E tests with:
pnpm test:e2eFor convenient development with automatic reload, use the following commands:
pnpm dev:chromepnpm dev:firefoxThese commands will start a dev server that will automatically update files in the build directory when source code changes.
- Run
pnpm installto install the dependencies. - Run
pnpm start - Download extension in Chrome:
- Open
chrome://extensions/in the address bar - Turn on
Developer mode - Click
Load unpacked extension - Select
builddirectory.
- Open
pnpm dev:chrome # with hot reload (recommended)pnpm dev:firefox # with hot reload (recommended)pnpm build:chromiumThe extension will be built in the build/chrome directory.
pnpm build:firefoxThe extension will be built in the build/firefox directory.
npm run build:firefox-sourcesCreates a ZIP archive with source code required for Firefox Add-ons submission. Mozilla requires source code submission for extensions that use build tools or minification.
pnpm buildWe use GitHub Actions to automate the release process. The workflow:
- Bumps version based on commit messages
- Builds extensions for Chrome and Firefox
- Creates ZIP archives for both platforms
- Creates source code archive for Firefox Add-ons submission
- Publishes to Chrome Web Store and Firefox Add-ons (with source code)
- Creates a GitHub Release with both extension packages
See RELEASE_SETUP.md for details on configuring the release automation.
After developing your extension, run the command
pnpm run build
The repository is configured with actions for automatic releases to Github.
