-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Route wildcards get confused with query params #1452
Comments
Hi I am also facing the same , can anyone help me? |
It should be already fixed in v20.0 |
Hi @karinehovhannisyan! You need to re-define upstream template as following: {
"DownstreamPathTemplate": "/api/{version}/Companies/{companyId}/all?{everything}",
"UpstreamPathTemplate": "/api/{version}/Companies/{companyId}/all?{everything}",
} See more here 👉 But... {
"DownstreamPathTemplate": "/{everything}",
"UpstreamPathTemplate": "/{everything}",
} It should route any URL with any query strings. |
Already fixed by #1182 |
Hi, we lately faced a weird situation with wildcards and query params in Ocelot.
Expected Behavior
We would expect the wildcards to have no relation to anything that comes after the ? symbol and proceed the request as is.
Actual Behavior
If a route query parameter contains the value of the wildcard, its first symbol is truncated and the parameter name is changed.
Steps to Reproduce the Problem
Here is how we got this.
http://localhost/api/v2/Companies/111/all?companyIds=111&companyIds=123
I also tried to add the
{everything}
after the ?, but then if one makes a call like this:http://localhost/api/v2/Companies/111/all/?companyIds=111&companyIds=123
They receive a 404 error.
Specifications
The text was updated successfully, but these errors were encountered: