Skip to content

itsgood87/headersnap

Repository files navigation

HeaderSnap

Privacy-first Chrome extension for editing HTTP request & response headers.

HeaderSnap is a clean, ad-free ModHeader replacement built on Chrome's Manifest V3 and the native declarativeNetRequest API. Add, modify, or remove headers on requests matching the URL patterns you choose — no analytics, no ads, no telemetry.

🌐 headersnap.com · 🧩 Install from the Chrome Web Store

Features

  • Add / modify / remove request and response headers
  • URL pattern matching (glob or regex) with a live preview of what matches
  • Profiles — switch header sets between dev, staging, and production
  • ModHeader import — bring your existing ModHeader v2 config over
  • Native export / import — back up and share your own rule sets
  • URL pattern tester — check a URL against your rules before you rely on them
  • Activity log — the last 200 header operations, stored locally on your device
  • Truly private — no analytics, no ads, no telemetry, no tracking

Why HeaderSnap?

It uses Chrome's native Declarative Net Request (DNR) engine, so header rules are applied by the browser itself — efficient, with no persistent background service worker keeping your machine busy. Everything stays on your device.

Install

Install from the Chrome Web Store →

Or load it unpacked from source:

npm install
npm run build          # production build → dist/

Then in Chrome: chrome://extensions → enable Developer modeLoad unpacked → select the dist/ directory.

Development

npm run dev            # Vite dev server with hot module reload
npm run build          # production build → dist/
npm run test           # run the Vitest suite
npm run typecheck      # TypeScript type checking
npm run lint           # ESLint

Tech Stack

  • Preact 10 + TypeScript 5 + Vite 4
  • @crxjs/vite-plugin for Chrome extension bundling
  • Chrome Manifest V3, declarativeNetRequest API
  • Vitest + Testing Library for tests

Architecture

  • Rules are stored in chrome.storage.sync (synced across your devices, 100 KB quota)
  • Activity logs are stored in chrome.storage.local (device-local, higher volume)
  • A background service worker syncs your rules to Chrome's DNR engine on install, startup, and profile switch
  • The popup is a tab-based UI: Rules, Test, and Logs
src/
├── background/     # service worker + DNR rule engine
├── popup/          # Preact UI (rules, tester, logs, import/export)
├── services/       # storage + profile management
├── utils/          # pattern conversion, ModHeader parser, export format
└── types/          # shared TypeScript types

License

MIT © Tim Green

About

Privacy-first Chrome extension (Manifest V3) for editing HTTP request & response headers per URL pattern — a clean, ad-free ModHeader replacement. Profiles, live pattern testing, activity logs, and ModHeader import. No analytics, no telemetry.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages