A modern Manifest V3 Chrome/Edge extension to redirect requests, mock responses, modify headers, and inject JS/CSS — per-rule with wildcards or regex.
5.0 · 1 rating 0 0
Copies a short prompt — paste it into Cursor (or another AI agent) to set this up for you.
Guidance
A modern, Manifest V3–compatible Resource Override extension for Chrome & Edge. Redirect requests, mock responses (JSON/JS/CSS), modify response headers, and inject JS/CSS — per rule, with wildcards or regex and a clean UI.
Redirect URL → URL; mock body (immediate 307 or after-response); match by method + request body to disambiguate same-URL calls.
A modern, Manifest V3–compatible Resource Override extension for Chrome.
Redirect requests, mock responses (JSON/JS/CSS), modify response headers, inject JS/CSS, and control behavior per-rule with wildcards or regex — all with a clean, friendly UI.
Inspired by Resource Override by Kyle Paulsen. · Originally created by Annie Rosh with OpenAI. · Maintained by Yehuda Huri (@udah1).
🔒 Privacy: this extension collects no data and stores all rules locally. See PRIVACY.md.
Immediate mock (shows 307 Internal Redirect + data: in DevTools)
After response mock (fetch/XHR only)
Option to wait for the real network call and then return your mock — keeps loaders/timing accurate
Match by HTTP method + request body — distinguish two calls to the same URL by their payload (e.g. two POSTs with different bodies) using contains / equals / regex
Modify response headers
Add/override headers (e.g., X-Debug: yes)
Expose to JS option automatically adds for the headers you set, so /XHR can read them across origins
Works under strict CSP pages (MAIN world injection for page hooks)
🚀 Install (Developer Mode / from source)
Download the latest zip and extract the folder open-resource-override-mv3.
Open chrome://extensions → enable Developer mode (top-right).
Click Load unpacked → select the extracted open-resource-override-mv3 folder.
Open Details → Extension options to configure rules.
You can also drag the whole folder into chrome://extensions.
🧭 Usage Overview
Rule Types
Redirect URL → URL
Replace a URL with another URL. Good for swapping endpoints or static files.
Mock with text
Return your own body (JSON/JS/CSS/plain).
Immediate: uses Declarative Net Request to redirect to a data: URL → DevTools shows 307 Internal Redirect.
After response (fetch/XHR only): page receives your mock, but DevTools still shows the real call.
Wait for real response: first completes the real network (keeps loaders/timing), then delivers your mock to app code.
Modify response headers
Add/override/remove response headers. For new headers to be readable from JS, enable Expose to JS (adds Access-Control-Expose-Headers automatically for the headers you set).
Inject JS / Inject CSS
Injects content into matching pages.
Patterns
Wildcard (easiest): */tenants/*/runtime/analytics/dashboards*
Matches any tenant, with/without query.
Regex (advanced): use full regular expressions.
You can also add Exclusions (comma-separated) that are applied as regex exclusions.
After response mock → DevTools shows the real request; page receives your mock.
Header modifications are visible in Network → Response Headers.
For JS to read custom headers on cross-origin responses, use Expose to JS.
⚠️ Notes & Limitations
Some headers are restricted by Chrome and cannot be modified (e.g., certain hop‑by‑hop or security headers). Custom headers are fine.
If a request is redirected (Immediate mock), header modifications for that same request won’t apply (DNR is single‑action).
For opaque fetch responses (mode: "no-cors"), headers/body are not readable by JS regardless of exposure.
JS/CSS injection is subject to page CSP, but the page hook (used for After-response mocks) runs in the MAIN world and is CSP‑safe.
🧰 Power Tips
Use Priority to control which enabled rule wins when multiple match.
Use Resource Types to target only xmlhttprequest/fetch (or include others).
The Prettify button formats JSON/JS/CSS bodies for readability.
Export your rules as a JSON file and share them with your team.
🙌 Credits
Inspired by:Resource Override by Kyle Paulsen — the original extension that pioneered this workflow.
Original creator:Annie Rosh (built with OpenAI) — the original Open Resource Override (MV3) concept and implementation.
Author / maintainer:Yehuda Huri (@udah1) — this repository, including additional features such as URL + request-body matching for POST/PUT/PATCH, the URL match tester, multi-theme UI, and the redesigned options/popup.
Built as a modern successor to the classic “Resource Override” idea for today’s MV3 world.