Added support for dynamic trailing slash in routes