Fix matching prefix for api routes