/api was not redirecting to /api/public