# l-switch

> Proxy localhost API calls to production or staging with JSON rules. Supports CHIPS(partitioned cookies): reads partition-scoped cookies and injects them on redirect so local dev can authenticate against real backends—no companion extension on Firefox

Canonical page: [https://chrome-stats.com/d/l-switch](https://chrome-stats.com/d/l-switch)

## Overview

- **ID:** `l-switch`
- **Platform:** Firefox
- **Type:** Firefox add-on
- **Status:** Available
- **Publisher:** bingrulin
- **Category:** web-development
- **Daily users:** 2
- **Version:** 1.0.22
- **Last updated:** 2026-05-28
- **First published:** 2026-05-25
- **Size:** 1.13 MB
- **Data as of:** 2026-09-07
- **Store listing:** [Firefox Add-ons Store](https://addons.mozilla.org/firefox/addon/l-switch/)

## Description

<strong>l-switch</strong> is the Firefox client for <strong>pm-switch</strong>: a developer tool for running <strong>local front-end code against real production or staging APIs</strong>.

Modern browsers enforce <strong>CHIPS</strong> (Cookies Having Independent Partitioned State). After CHIPS, whether a cookie is sent depends not only on <code>Domain</code> and <code>SameSite</code>, but also on the cookie’s <strong>partition</strong> (the top-level site context). A simple in-browser redirect from <code>localhost</code> to an online host is often <strong>not enough</strong>—partitioned cookies may not ride along automatically.

<strong>l-switch</strong> handles that for you: when a proxy rule matches, it <strong>reads partitioned cookies</strong> for the target site and <strong>injects</strong> them (and related headers such as CSRF tokens) into the proxied request, so your local app can still call authenticated online backends.

Key features
<ul><li><strong>CHIPS / partitioned cookie support</strong> — Uses <code>cookies</code> API with partition awareness and injects the right cookies on redirected traffic (see <code>getPartitionCookie</code> in the extension).</li><li><strong>URL proxy rules</strong> — <code>src</code> → <code>tgt</code> matching (string or regex).</li><li><strong>Header helpers</strong> — Referer, Origin, optional <code>headersToAdd</code> / <code>headersToDel</code>, and <code>cors</code> host lists for cross-origin scripts after redirect.</li><li><strong>JSON configuration</strong> — Edit rules in the popup; toggle the toolbar switch to enable or disable.</li></ul>
On <strong>Firefox</strong>, proxy + cookie injection runs in <strong>one extension</strong> (async <code>webRequest</code> blocking). On <strong>Chrome</strong>, the same workflow still uses <strong>m-switch</strong> + <strong>p-switch</strong>; Firefox users only need <strong>l-switch</strong>.

Who it is for

Front-end and full-stack developers who:
<ul><li>Develop on <code>localhost</code> (or another local origin) but need live backend responses</li><li>Rely on <strong>partitioned (CHIPS) cookies</strong> for login/session on the target domain</li><li>Want the xswitch / pm-switch workflow without manually copying cookies</li></ul>
Quick start
<ol><li>Open the popup and edit JSON (<code>proxy</code>, optional <code>cors</code>).</li><li>Turn the extension <strong>on</strong>.</li><li>Reload your app; use <code>credentials: "include"</code> on fetches when cookies are required.</li></ol>
Example:

```json
{
  "proxy": [
    {
      "src": "http://127.0.0.1:7001/(.*)\.json",
      "tgt": "<a href="https://prod.outgoing.prod.webservices.mozgcp.net/v1/b6a74d1010abdeb5d19016e88f4b5316c2d5222ff5561ef932d18ac93a03bb12/https%3A//example.com/%241.json" rel="nofollow">https://example.com/$1.json</a>",
      "headersToAdd": [
        {
          "headerName": "X-Xsrf-Token",
          "fromCookieName": "XSRF-TOKEN"
        }
      ]
    }
  ],
  "cors": ["<a href="https://prod.outgoing.prod.webservices.mozgcp.net/v1/2141eac2eacda036b00afc30fd0a7e6f24e9bddf402cf4393fe5144f468147e8/http%3A//example.com" rel="nofollow">example.com</a>"]
}

## Rankings

- #67,655 — Overall
- #189 — switch

## Permissions and access

### Permissions

- `storage`
- `tabs`
- `webRequest`
- `webRequestBlocking`
- `<all_urls>`
- `cookies`
- `browsingData`

## Safety

- **Risk impact:** High risk impact
- **Risk likelihood:** High risk likelihood

### Analysis details

- Grants access to browser tabs, which can be used to track user browsing habits and history, presenting a privacy concern.
- This extension has low user count. Unpopular extensions may not be stable or safe.

> Some risk analysis details are omitted from this free response. [Upgrade to view the full analysis](https://chrome-stats.com/pricing).

## Similar extensions and apps

- [Cookie/LocalStorage Switcher](https://chrome-stats.com/d/cookie-storage-switcher)
- [Link Switcher](https://chrome-stats.com/d/link-switcher) — 1 users
- [Shift Proxy Switcher](https://chrome-stats.com/d/shift-proxy-switcher) — 1 users
- [Proxy Switcher](https://chrome-stats.com/d/set-proxy-switcher) — 19 users, 5.00 / 5
- [Environment Cookie/LocalStorage Switcher](https://chrome-stats.com/d/cookie-local-switcher)
- [SmartProxy Switcher](https://chrome-stats.com/d/smartproxy-switcher) — 1 users
- [SOCKS5 Switcher](https://chrome-stats.com/d/socks5-switcher) — 64 users
- [Switcher - A Powerful Proxy Manager](https://chrome-stats.com/d/switcher_proxy) — 22 users, 3.33 / 5
- [localivelize](https://chrome-stats.com/d/localivelize) — 1 users
- [Simple Proxy Switcher - SPS](https://chrome-stats.com/d/simple-proxy-switcher-sps) — 2 users
- [LightProxy](https://chrome-stats.com/d/lightproxy) — 475 users, 3.87 / 5
- [Proxy Toggle Switcher FF](https://chrome-stats.com/d/proxy-toggle-switcher-ff) — 11 users, 5.00 / 5

---

Source: [Chrome-Stats](https://chrome-stats.com/d/l-switch)
