Path-based routing without ending slash Azure Application Gateway

I'm currently working on Azure Application Gateway to redirect request to 2 WebApi using Path-based rule as below:

"/foo/*" -> FooApi
"/bar/*" -> BarApi

And a default backend api that does nothing for now.

When I request to, it works fine. But if I missed an ending slash, so with the URL, it returns 500 URL Rewrite Module Error.

Current ApplicationGatewayBackendHttpSettings I set -Path to "/".

I tried to add few more routes to the rule liked "/foo", "/foo/", but it doesn't work.

Any advises, please?