Issue #2145041 by tim.plunkett: Allow dynamic routes to be defined via a callback.