mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
ProxyURL path configuration #717
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tomas-pinto on GitHub (Sep 24, 2025).
Originally assigned to: @StefH on GitHub.
Is it possible to add transformers to url path logic?
In case the request is of the form: http://host1/a/b/c, I want to be able to proxy to http://host2/c/d.
@StefH commented on GitHub (Sep 28, 2025):
@tomas-pinto
Current you can indeed only replace source path with a hard-coded new path using:
I think it's possible to add logic so that
NewValuewill also be handled as a Handlebars template, which means you should be able to do any transform you like.Is this a solution?
@StefH commented on GitHub (Sep 28, 2025):
https://github.com/wiremock/WireMock.Net/pull/1361
@tomas-pinto commented on GitHub (Sep 30, 2025):
Thank you very much @StefH! That seems to be what I needed.
Could you please update wiremock.net-windows docker image for me to test?
@StefH commented on GitHub (Sep 30, 2025):
@tomas-pinto
mmm,
I doubt if you can configure this new logic in docker?
@StefH commented on GitHub (Sep 30, 2025):
@tomas-pinto
I just checked, it's not yet possible to configure this using mapping json. I need to make a fix.
@StefH commented on GitHub (Sep 30, 2025):
The json model will look like:
@StefH commented on GitHub (Sep 30, 2025):
https://github.com/wiremock/WireMock.Net/pull/1362
@tomas-pinto commented on GitHub (Oct 1, 2025):
Hello @StefH, I tested with image "sheyenrath/wiremock.net-windows:1.13.0" and when I give only the TransformerTemplate parameter in the mapping I get a 500 saying:
Mapping that was posted:
Additionally, if I do GET mappings "TransformTemplate" is not being parsed:
@StefH commented on GitHub (Oct 1, 2025):
@StefH commented on GitHub (Oct 3, 2025):
@tomas-pinto can you try docker version
1.14.0-preview-01?@StefH commented on GitHub (Oct 4, 2025):
@tomas-pinto were you able test this version?
@tomas-pinto commented on GitHub (Oct 6, 2025):
Yes, this version doesn't show the previous mentioned error and I've been able to do the reverse proxying I needed! Thank you very much!
@StefH commented on GitHub (Oct 6, 2025):
Thanks for verification.