getappmap / appmap-ruby

AppMap client agent for Ruby
https://appland.org
Other
100 stars 13 forks source link

`normalized_path` may be wrong if the path matches many potential routes #316

Open dustinbyrne opened 1 year ago

dustinbyrne commented 1 year ago

E.g. given the following routes.rb:

get 'api/users'
get ':team_slug/users'

It appears possible for a call to /api/users to return a normalized path of /:team_slug/users incorrectly when the path matches the route definition.

https://github.com/getappmap/appmap-ruby/blob/master/lib/appmap/handler/rails/request_handler.rb#L59-L66

dustinbyrne commented 1 year ago

This may only occur due to URL rewriting in the client application. No X-Cascade headers were being set.