-
-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scenario with proxy not removing route prefix #1024
Comments
Currently it's not yet possible to define this per request. But you can define it in the settings: via ReplaceSettings |
@mark-hingston Did you have time to test this, or should I just merge this change? |
@StefH I haven't had the chance to test the changes in the PR, but it looks good to merge 👍 Thanks again. |
PR is merged. A new NuGet will be released this week. |
Hi @StefH I'm sending the following mapping to the POST [{
"Scenario": "SucceedOnThirdAttemptScenario",
"SetStateTo": "SecondAttempt",
"Priority": 1,
"Request": {
"Methods": ["GET", "POST"],
"Path": {
"Matchers": [{
"Name": "WildcardMatcher",
"Pattern": "/google/*",
"IgnoreCase": false
}]
}
},
"Response": {
"StatusCode": 503
}
},
{
"Scenario": "SucceedOnThirdAttemptScenario",
"WhenStateIs": "SecondAttempt",
"SetStateTo": "ThirdAttempt",
"Priority": 1,
"Request": {
"Methods": ["GET", "POST"],
"Path": {
"Matchers": [{
"Name": "WildcardMatcher",
"Pattern": "/google/*",
"IgnoreCase": false
}]
}
},
"Response": {
"StatusCode": 503
}
},
{
"Scenario": "SucceedOnThirdAttemptScenario",
"WhenStateIs": "ThirdAttempt",
"Priority": 1,
"Request": {
"Methods": ["GET", "POST"],
"Path": {
"Matchers": [{
"Name": "WildcardMatcher",
"Pattern": "/google/*",
"IgnoreCase": false
}]
}
},
"Response": {
"ProxyUrl": "https://google.com",
"ProxyUrlReplaceSettings ": {
"OldValue": "/google",
"NewValue": "",
"IgnoreCase": true
}
}
}
] When I try requesting Many thanks. |
@mark-hingston |
I'm using WireMock.Net.StandAlone 1.5.39 and have the following scenario:
The issue I'm finding is that on the third request when proxying to the upstream it is including the route prefix in the path e.g.
https://eu-test.oppwa.com/hyperpay/v1/checkouts
instead ofhttps://eu-test.oppwa.com/v1/checkouts
.How can I remove the route prefix? Thanks
The text was updated successfully, but these errors were encountered: