I want to have a wiremock rule that will match
/my-login-service/callback.*
and will redirect to
https://myservice.local/myservice/callback
while keeping all the query parameters intact.
How can I use Wiremock server to redirect with all the existing headers from the original request to the willReturn?
stubMappingProxy = wireMock.register(WireMock.get(WireMock.urlPathMatching("/my-login-service/callback.*"))
.willReturn(WireMock.aResponse()
.withStatus(302)
// how do i redirect to a location based on the request path?
.withHeader("Location", "https://myservice.local/my-login-service/callback"))));