api routes with next-intl
Hi,
I'm using convex password auth with nextjs and it was working fine, but then i implemented next-intl and now the api routes are returning 404 i've tried to make the next-intl dont run on the api routes but then in also return an error on the next-intl saying that:
Unable to find next-intl locale because the middleware didn't run on this request. See https://next-intl-docs.vercel.app/docs/routing/middleware#unable-to-find-locale. The notFound() function will be called as a result.
POST /api/auth 404 in 171ms
with next-intl running on the api route:
POST /pt-BR/api/auth 404 in 39ms
Middleware.ts:
ill be happy if somebody could give me some direction here, thanks in advance guys!1 Reply
Have you tried skipping the middleware just for
/api/auth
as opposed to all of /api
? I don't think anything in /api/auth
should be requiring the locale.