When using basePath in a next.config.js file, the "inngest/next" serve handler doesn't detect the correct URL.
To Reproduce
Add basePath: "/example" to examples/framework-nextjs/next.config.js
Run pnpm run dev:example --example framework-nextjs
Run npx inngest-cli@latest dev
In the dev server UI, add http://localhost:3000/example/api/inngest
Expected behavior
The app should correctly register, but instead fails.
The reported URL from the app is still http://localhost:3000/api/inngest (missing the /example prefix), so the dev server also erroneously displays both that and the prefixed URL.
Describe the bug
When using
basePath
in anext.config.js
file, the"inngest/next"
serve handler doesn't detect the correct URL.To Reproduce
basePath: "/example"
toexamples/framework-nextjs/next.config.js
pnpm run dev:example --example framework-nextjs
npx inngest-cli@latest dev
http://localhost:3000/example/api/inngest
Expected behavior
The app should correctly register, but instead fails.
The reported URL from the app is still
http://localhost:3000/api/inngest
(missing the/example
prefix), so the dev server also erroneously displays both that and the prefixed URL.It looks as though Next.js gives us little
Code snippets / Logs / Screenshots
System info: