I suggest passing the Request instead of only the pathinfo, to allow more complex matching if needed