Skip to content

Incorrect routing when the query parameter is in the configuration #2064

@Burgyn

Description

@Burgyn

Hi guys.

I discovered strange and different routing behavior between versions 22.0.1 and 23.0.0.

Expected Behavior

In version 22.0.1 the routing works well as expected.
We have the following configuration:

{
    "DownstreamPathTemplate": "/{tenantId}/products?{everything}",
    "UpstreamPathTemplate": "/{tenantId}/products?{everything}",
    "UpstreamHttpMethod": [ "Get" ]
},
{
    "DownstreamPathTemplate": "/{tenantId}/products/{everything}",
    "UpstreamPathTemplate": "/{tenantId}/products/{everything}",
    "UpstreamHttpMethod": [ "Get" ]
},

When I call a request

GET localhost/1/products/1

then the correct route "/{tenantId}/products/{everything}" is selected.

Actual Behavior

In version 23.0.0 the "DownstreamPathTemplate":"/{tenantId}/products?{everything}" path is chosen for some reason, which is not correct.

Specifications

  • Version: >23.0.0

Maybe this PR? #748

Any idea for a quick fix on my part?
Thank you very much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NET9.NET 9 releasemergedIssue has been merged to dev and is waiting for the next release

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions