Overview
Proxy API calls to FAT/UAT/PROD, no code or CORS changes. Rewrite URLs/headers/responses, mock, delay, block, retry, WebSocket.
Your frontend talks to FAT, but the change you need to verify only exists on UAT. This extension lets you add one rule in Chrome instead of editing a dev-server proxy in every project, hardcoding a token, or asking the backend to open CORS and redeploy. Reach for it if any of these is familiar: - The console says blocked by CORS policy / Access-Control-Allow-Origin and you do not own the backend deployment - A localhost dev page needs to call an internal test environment - The API is not written yet, but the UI has to move forward - You need to exercise the timeout, HTTP 500 and offline fallback states without asking a backend engineer to reproduce them - You want another environment's auth token on the request without putting it in source control - Real-time features (WebSocket) have to follow the same environment switch - You want to hand a whole debugging setup to a teammate without describing it in chat What it does: - Match requests by wildcard, prefix or regular expression and forward them to another environment - Inject or replace request headers (such as the target environment's auth token) and replace request bodies - Send the target environment's cookies per rule, off by default: when a rule turns it on the extension issues the request with credentials: 'include', carrying the session you already have there instead of a cookie pasted into the header overrides - Response overrides: the status code, the response headers, or individual JSON fields by dot-notation path (`data.token`) - Mock responses with your own fake data (JSON / text / HTML / XML) when the API is not built yet - Conditional mock responses: give one rule several conditions (URL pattern, request method, query parameters) and the first match decides the body, status and Content-Type - Add 0–60000 ms of latency to throttle a slow network and exercise loading, skeleton and timeout states - Block requests to verify error handling and offline fallbacks; a blocked request is never replayed - Retry automatically on network errors, 5xx responses and the 30-second per-attempt timeout — off, or 1–5 attempts with a 100–30000 ms interval - Limit a rule to specific HTTP methods (GET/POST/PUT/DELETE/PATCH/OPTIONS/HEAD), or append and override query parameters on the proxied URL (gray-release tags, __env=uat) - Forward WebSocket connections, so real-time features follow the same environment switch - Rules that only rewrite a URL are resolved inside the browser's network layer (declarativeNetRequest), adding no script work to your page; turning the global switch off uninstalls those rules too, so no invisible redirect is left behind How a rule gets picked: - List order is priority — the lowest number matches first, and a request is handed to the first rule that matches it; the rules below are never evaluated - The URL match tester also lists the rules that match the same URL but sit behind it, so you can see the effect of a reorder before you make one - An empty target URL means "stay on this environment": the request is issued by the extension without changing its address, which is how you add a header or response override without redirecting anything Typical rules (swap the example hosts for your own): - Cross-environment switch: match https://fat-api.example.com/* → target https://uat-api.example.com - Use the other environment's credentials: add a request header override Authorization: Bearer <your UAT token> to that rule - API not ready yet: enable Mock with status 200, Content-Type application/json, and your sample JSON as the body - Slow network: enable delay with 3000–8000 ms - Failure states: enable Block, or override the response status to 500 - Gray release / A-B branch: append the query parameter __env=uat on the proxied URL - Send only writes to the test backend: restrict the rule to POST / PUT / DELETE Who reaches for it: - Frontend work: the API belongs to someone else and the page still has to move — proxy to another environment, or mock the endpoint that is not finished - Full-stack work: a localhost dev server calling an internal test backend, without a dev-server proxy table to maintain in every project - QA and integration support: timeouts, HTTP 500, offline and slow-network paths reproduced from delay and block, with nobody on the backend having to cooperate - Multi-environment or gray-release work: tag the proxied URL with a query parameter, switch FAT / UAT / PROD with a named profile - Handing a setup over: JSON export, HAR-to-rules, paste-a-cURL-to-a-rule — your teammate imports the identical configuration Debugging and teamwork: - A request log with method, status, duration and the rule that matched; open any entry for request and response headers and text bodies (a binary response body is not stored), JSON auto-formatted - A URL match tester in the header bar: type any URL (optionally with a method) to see in real time which rule matches, what the rewritten URL is, which channel it takes, and which other rules match the same URL but lose to it - Copy any logged request as cURL, using its original URL; HAR 1.2 export, HAR import that generates rules from recorded traffic (those rules arrive disabled until you enable them), and cURL paste import - Drag to reorder rule priority, enable/disable/delete one at a time or in batch, search by name, pattern or target, and filter by status and match type - Batch-migrate target domains across rules with a per-rule change preview - Start from a quick template while the list is still empty (wildcard proxy, prefix match, auth header, header override), and undo a delete immediately — a mistaken removal does not mean retyping the rule - Save the whole rule set as a named environment profile and switch between FAT, UAT and PROD in one click - Export configuration as JSON; share mode is on by default, stripping Authorization / Cookie style request and response headers plus token-like query parameters (untick it for a verbatim backup). On import you replace the current rules or merge into them, so a teammate gets the identical setup - Per-rule hit counts for both channels: the network layer over the last 5 minutes, the background channel since the last config change (an in-memory count that restarts when the worker is recycled) One thing that is by design, not a bug: a rule that only rewrites the URL is handled by the browser's network layer, so that request never passes through the extension's scripts and does not appear in the request log. For those rules, read the "This tab · 5 min" network-layer counter in the popup, verify with the URL match tester, or check the rule's hit count; anything with an override, mock or delay shows up in the log normally. If a rule seems not to take effect, check in this order: 1. The global switch in the popup is on (switching it off also removes the network-layer rules) 2. That rule itself is enabled 3. You reloaded the page — requests already sent are not rewritten retroactively 4. Test the actual URL in the URL match tester: an enabled rule with a lower priority number may be matching first and shadowing it 5. For regex rules, make sure the pattern covers the whole URL: the network layer replaces the entire URL while the background channel replaces only the part your pattern matched About the same-origin policy: a page may only read responses that come from the same origin — same scheme, same host, same port — and a call carrying custom request headers first has to survive a preflight (OPTIONS). If the preflight or the real response is missing an Access-Control-Allow-Origin that allows your origin, the request never reaches your application code: "the response is right there in the Network tab, but the console reports an error" is the same event seen from both sides. This extension changes nothing on the backend and does not pretend the check disappears — a simple rule changes the address a request goes to, a complex rule changes who issues it. The rule took effect, the address did change, and the console still says CORS — that usually is not a broken rule. A request whose only rewrite happened in the network layer is still a cross-origin request the browser checks against the same-origin policy, so a target environment that does not allow your origin gets blocked. Add any capability to that rule (a response header override is the cheapest) and it moves to the background channel: the extension issues the request and hands the page a response it constructed, so the page's CORS check never runs. The URL match tester shows which channel a given address is currently taking. How it differs from the usual options: - Versus a per-project dev-server proxy: rules live in the browser, apply to every project at once, and can rewrite responses instead of only forwarding - Versus a system-wide capture proxy: no local certificate to install, no system network settings to change, no system proxy port to configure, and it only touches pages in the browser. A company VPN or a capture tool keeps working alongside it — the rewrite happens inside the browser, so those tools see the rewritten request rather than competing with it - Versus editing project config or build scripts: it writes no file in your repository and appears in no build output, so a teammate never has to find the proxy line in your project — and nobody commits their localhost address - Versus an API client or a header-modifier extension: it works on the requests the page actually makes, instead of asking you to replay them in another tool - Its limits, stated plainly: it is a browser tool. It cannot help a server-to-server call, and its rules live in your Chrome profile — export JSON when a teammate needs them. What it is not: - Not a public CORS relay: a request only ever goes to the address written in your own rule, never through somebody else's server - Not a VPN or a system proxy: it changes no system network setting and carries no other application's traffic — only the browser requests your rules name - Not a packet-capture debugger: no local root certificate, no TLS inspection, no recording of everything the machine sends, no archive of past responses - Not an API platform: mocking stands in for an endpoint that is not written yet; it is not interface documentation, test-case management, or a collaboration backend - Not a server-side gateway or reverse proxy: you type the target address in the browser, and no configuration ends up in a project file or in infrastructure Interface: - English and Chinese UI, six themes, light / dark / system modes - Popup with a global switch, the request count via the extension (background channel only), this tab's network-layer hit count over the last 5 minutes, an auto-off countdown, a preview of which rule matches the page you have open (network-layer rules Chrome won't apply go red), and "create a rule for this page" - Auto-off countdown of 30 minutes, 1, 2 or 4 hours, built on browser alarms so it survives service-worker restarts - Keyboard shortcut Ctrl+Shift+P (⌘⇧P on macOS) to toggle proxying; on the options page N adds a rule, / or ⌘F focuses search, Esc closes the topmost dialog About your data: - Rules, logs and preferences are stored in your browser's local storage on your own device. No accounts, no analytics, no telemetry, no servers of ours - The only network traffic is the API traffic you ask it to proxy; exports are written locally - The extension itself has zero remote dependencies: no remote scripts, no calls to any endpoint of ours, and its UI, rules and logs are all read from local storage (the API you proxy obviously still has to be reachable) - About the "change the data on websites you visit" permission: proxied requests happen on each developer's own internal domains, localhost and staging hosts, which cannot be enumerated in advance. The extension uses that permission for two things only — injecting the interceptor into pages you browse, and issuing requests on your behalf according to rules you created. Nothing is sent to any third party or to a developer-controlled server - About "Send cookies": off by default. When a rule turns it on, the session that goes out is the one you already have at the environment that rule points at, and the request still travels only to that address — never through a third party or our servers - Privacy policy: https://liaolongdong.github.io/cross-origin-proxy/privacy.html - Product overview: https://liaolongdong.github.io/cross-origin-proxy/ Limits: 200 rules, the last 500 log entries, 10 MB request body, delays of 0–60000 ms, and mocked or overridden status codes clamped to 200–599 so the page can always build a valid response. Requires a recent desktop Google Chrome (Manifest V3). Source code and issue tracker: https://github.com/liaolongdong/cross-origin-proxy FAQ: Does it require backend changes? No. Rules take effect entirely inside the browser. No backend code changes, no CORS headers to add, no redeployment needed. I added a rule but nothing changed — what do I check? In order: Is the global switch in the popup on? Is the rule itself enabled? Did you reload the page (sent requests are not rewritten retroactively)? Test the URL in the match tester — a higher-priority rule may be shadowing it. For regex, make sure the pattern covers the whole URL: the network layer replaces the entire URL while the background channel replaces only the matched part. The rule works but the console still says CORS? A URL-only rewrite is still a cross-origin request subject to same-origin policy — if the target does not allow your origin, it gets blocked. Add any override capability to that rule (a response header override is the cheapest) and it moves to the background channel, where the page's CORS check no longer applies. The URL match tester shows which channel a given address is currently taking. Does it conflict with system proxies or capture tools? No. It works only inside the browser and does not change system proxy settings. Company VPNs and capture tools like Charles keep working — the rewrite happens inside the browser, so external tools see the rewritten request. What matching modes are supported? Three: wildcard (ending with *), prefix match, and regular expression. Wildcard and prefix rules are handled by the browser's network layer with zero JavaScript overhead; regex and rules with advanced capabilities (override, mock, delay, block, retry, header override, query parameter injection) are handled by the extension's background. Are there limits on rules? Up to 200 rules, the last 500 log entries, 10 MB request body, delays of 0–60000 ms, and mocked or overridden status codes clamped to 200–599. Is any data uploaded to a server? No. Rules, logs and preferences are stored in your browser's local storage only. No accounts, no analytics, no remote endpoints. The only network traffic is the API traffic you ask it to proxy. Which browsers are supported? A recent desktop Google Chrome (Manifest V3) is required. Firefox, Safari, Edge and mobile browsers are not supported — the extension relies on Chrome-specific APIs. Will it touch my other tabs or production? Nothing happens by itself. Only enabled rules act, and only on requests whose URL matches one of them; switching the global toggle off removes the network-layer rules with it. If you would rather not leave proxying on all day, set the auto-off countdown to 30 minutes, 1, 2 or 4 hours. I changed machines — how does a teammate get the same setup? Export the configuration as JSON (share mode is on by default and strips credential-like request and response headers plus token-like query parameters) and let them import it either over their rules or merged into them; a whole rule set can also be saved as a named environment profile and switched in one click. The rules themselves live only in your browser's local storage — there is no cloud sync.
Details
- Version1.8.0
- UpdatedNovember 2, 2026
- Size405KiB
- Languages2 languages
- DeveloperWebsite
Email
924902324@qq.com - Non-traderThis developer has not identified itself as a trader. For consumers in the European Union, please note that consumer rights do not apply to contracts between you and this developer.
Privacy
Cross-Origin Proxy - CORS & API Environment Switcher has disclosed the following information regarding the collection and usage of your data. More detailed information can be found in the developer's privacy policy.
Cross-Origin Proxy - CORS & API Environment Switcher handles the following:
This developer declares that your data is
- Not being sold to third parties, outside of the approved use cases
- Not being used or transferred for purposes that are unrelated to the item's core functionality
- Not being used or transferred to determine creditworthiness or for lending purposes