handle trailing slash on /api/routes/