The mapping still names the real target service. Configure WireMock's intermediary on its server configuration:

import com.github.tomakehurst.wiremock.WireMockServer;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;

var server = new WireMockServer(
    WireMockConfiguration.wireMockConfig()
        .proxyVia("proxy.example.net", 8080)
);

For a proxied request, the path is client → WireMock → corporate proxy → target service. The client needs a route to WireMock; proxyVia controls the connection WireMock makes afterward.

Replacing the target URL with the corporate proxy's base address changes the requested service. It does not express that extra hop.

If no upstream request appears, check whether the response came entirely from a recorded stub. Playback can avoid the target and proxy connection, so evaluate this setting on the mode that actually performs live proxying.

ХӀокхунах тера йаззамаш