Skip to content

I have some trouble on route match #3134

Description

@zhuliquan

Issue description

I set two routes like this:
##route1
{"uris":["/test/v1/files/*"],"name":"get_file1","desc":"get_file1","methods":["GET"],"vars":[],"plugins":{"proxy-rewrite":{"regex_uri":["^/test/v1/files/(.+)","/v1/files/$1"]}},"upstream_id":"333773215308464216"}
##route2
{"uris":["/test/v1/files:listReputationHistories"],"name":"list_reputation_history1","methods":["POST"],"vars":[],"plugins":{"proxy-rewrite":{"uri":"/v1/files:listReputationHistories"}},"upstream_id":"333773215308464216"}

But run command: curl "http://127.0.0.1:9080/test/v1/files:xxxdsadsadxxx" -XPOST -d {"uri":"xxx"} , It also can return results.
APISIX sames to match '/test/v1/files:xxxdsadsadxxx' to '"/test/v1/files:listReputationHistories'. I also try other cases: curl "http://127.0.0.1:9080/test/v1/files: {any string}" -XPOST -d {"uri":"xxx"} , APISIX sames ignore string behind ':'.

Environment

  • apisix version (cmd: 2.1):

Metadata

Metadata

Assignees

No one assigned

    Labels

    checkingcheck first if this issue occurred

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions