Wiremock: how to change the proxy url, so the path is not proxied one on one

104 views
Skip to first unread message

Ko

unread,
Oct 19, 2020, 3:39:29 AM10/19/20
to wiremock-user

Hi!

when creating a wiremockserver and use proxy, you can a add the following snippet:

wireMockServer = new WireMockServer(options() .port(properties.getHttpPort()) .enableBrowserProxying(true) .fileSource(fileSource)

it will use then a json with for example:

  "request": { 
       "method": "GET", 
       "urlPattern": "\/path/to/app/.*" }, 
  "response": { 
       "proxyBaseUrl" : "https://somesite.com", } 
}

But the problem here is, it wil also redirect to the same path (urlPattern). But I want a different destination path like /app/.*

How can I do this? Thanks!

Reply all
Reply to author
Forward
0 new messages