Map Remote

Send matching requests to a different scheme, host, port or path, without rebuilding the app.

Mac iPhone and iPad

Map Remote redirects a request on its way out. The app still thinks it is talking to production; WireLens quietly sends the request to the URL you chose, then hands the answer back. It is the fastest way to point a build at staging, a local server or a colleague's branch deployment.

Create a rule#

Open Tools ▸ Map Remote, or select a flow and choose Create Map Remote Rule….

FieldExample
Fromhttps://api.example.com/*
Tohttps://staging.example.com:8443

Anything you leave out of To is kept from the original request, so mapping a host keeps the path, query and body intact.

You can also set the destination by component: change only the scheme, host, port, path or query, and leave the rest as the request had it. A rule can be narrowed by method, a header or a GraphQL operation name, and Test this rule checks it against sample URLs before you save.

The Host header follows the new origin#

When a rule sends a request to another hostname, WireLens rewrites the Host header and the TLS server name to match it. Virtual hosts and CDNs therefore answer for the name they actually serve, instead of refusing a request for a hostname they do not know.

Two exceptions are deliberate:

  • When the target is an IP address, WireLens keeps the original hostname in Host, because many origins refuse a request whose Host is a bare IP.
  • Preserve Host keeps the original Host header for any rule, for an origin that routes on the name the app asked for.

HTTPS hosts#

For HTTPS, the original host must be decrypted so WireLens can read and re-send the request. See SSL Proxying. The new origin gets a normal TLS connection from WireLens.

Free and Pro#

The free plan includes one Map Remote rule. Pro removes the limit.

From the command line#

bash
wirelens rules map-remote \
  --from 'https://api.example.com/*' \
  --to 'https://staging.example.com'

The MCP tool is add_map_remote.

Something here is unclear, or wrong for your setup? Contact support or write to support@wirelens.app.