You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a mapping that contains wildcard match on a specific header, the mapping is not created, API returns 201.
The created mapping is not returned in GET __admin/mappings.
Expected behavior:
Header match mapping should appear when querying GET __admin/mappings.
kaushiksk
changed the title
Admin API fails to create a mapping with Request Body matching using WildCardMatcher
Admin API fails to create a mapping with Request Header matching using WildCardMatcher
Sep 7, 2024
This works when I configure it directly in code as below:
mockServer.Given(Request.Create().WithHeader("myheader",newWildcardMatcher($"*aaaaaa*"))).WithTitle("Header based routing").RespondWith(Response.Create().WithProxy(mockServerEndpoint));
With this mapping, the wiremock server is able to do exactly what I intend, I validated from logs that my requests are successfully being matched and proxied. In fact, this is how I figured out the exact payload to send to the POST /__admin/mappings API (I got it from Get /__admin/mappings once the server was running).
So it seems like something that is only missing in the Admin API?
Describe the bug
When creating a mapping that contains wildcard match on a specific header, the mapping is not created, API returns 201.
The created mapping is not returned in
GET __admin/mappings
.Expected behavior:
Header match mapping should appear when querying
GET __admin/mappings
.Test to reproduce
POST /__admin/mappings
Response:
201 Created
Get /__admin/mappings
does not return this mapping.I am able to get other mappings that are created on path etc. using WildCardMatcher.
The text was updated successfully, but these errors were encountered: