PLA-1359: make it work for /api/v1 without ending slash too