Nettlesartillegg for Firefox
  • Utvidingar
  • Tema
    • for Firefox
    • Ordbøker og språkpakkar
    • Andre nettlesarplassar
    • Utvidingar for Android
Logg inn
Førehandsvising l-switch

l-switch av bingrulin

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

0 (0 omtalar)0 (0 omtalar)
Last ned Firefox og få utvidinga
Last ned fil

Metadata for utvidingar

Om denne utvidinga
l-switch is the Firefox client for pm-switch: a developer tool for running local front-end code against real production or staging APIs.

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

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

Key features
  • CHIPS / partitioned cookie support — Uses cookies API with partition awareness and injects the right cookies on redirected traffic (see getPartitionCookie in the extension).
  • URL proxy rules — src → tgt matching (string or regex).
  • Header helpers — Referer, Origin, optional headersToAdd / headersToDel, and cors host lists for cross-origin scripts after redirect.
  • JSON configuration — Edit rules in the popup; toggle the toolbar switch to enable or disable.

On Firefox, proxy + cookie injection runs in one extension (async webRequest blocking). On Chrome, the same workflow still uses m-switch + p-switch; Firefox users only need l-switch.

Who it is for

Front-end and full-stack developers who:
  • Develop on localhost (or another local origin) but need live backend responses
  • Rely on partitioned (CHIPS) cookies for login/session on the target domain
  • Want the xswitch / pm-switch workflow without manually copying cookies

Quick start
  1. Open the popup and edit JSON (proxy, optional cors).
  2. Turn the extension on.
  3. Reload your app; use credentials: "include" on fetches when cookies are required.

Example:

```json
{
"proxy": [
{
"src": "http://127.0.0.1:7001/(.*)\.json",
"tgt": "https://example.com/$1.json",
"headersToAdd": [
{
"headerName": "X-Xsrf-Token",
"fromCookieName": "XSRF-TOKEN"
}
]
}
],
"cors": ["example.com"]
}
Vurdert 0 av 0 meldarar
Logg inn for å vurdere denne utvidinga
Ingen vurderingar enno

Stjernevurdering lagra

5
0
4
0
3
0
2
0
1
0
Ingen vurderingar enno
Løyve og data

Påkravde løyve:

  • Fjern nyleg nettlesingshistorikk, infokapslar og relaterte data
  • Få tilgang til nettlesarfaner
  • Tilgang tiil dataa dine frå alle nettsider

Datainnsamling:

  • Utviklaren seier at denne utvidinga ikkje krev datainnsamling.
Les meir
Meir informasjon
Lenker for tillegg
  • E-post for brukarstøtte
  • Copy add-on ID
Versjon
1.0.22
Storleik
1,13 MB
Sist oppdatert
10 dagar sidan (25. mai 2026)
Liknande kategoriar
  • Nettutvikling
Lisens
ISC-lisens
Versjonshistorikk
  • Vis alle versjonar
Legg til i samling
Rapporter dette tillegget
Gå til Mozilla-heimesida

Utvidingar

  • Om
  • Firefox tilleggsblogg
  • Utvidingsverkstad
  • Utviklarsenter
  • Utviklarpraksis
  • Fellesskaps-blogg
  • Forum
  • Rapporter ein feil
  • Vurderingsguide

Nettlesar

  • Desktop
  • Mobile
  • Enterprise

Produkt

  • Browsers
  • VPN
  • Relay
  • Monitor
  • Pocket
  • Bluesky (@firefox.com)
  • Instagram (Firefox)
  • YouTube (firefoxchannel)
  • Personvern
  • Infokapslar
  • Juridisk

Om ikkje noko anna er spesifisert, er innhaldet på denne nettstaden lisensiert under Creative Commons Attribution Share-Alike License v3.0 eller ein seinare versjon.