support both endpoints: /api + /api/