I have a catch-all route in the pages folder: pages/[...params].tsx. Now, when I have an anchor tag pointing to my api routes (e.g. api/auth/google) or if I do Router.replace(/api/auth/google) the catch-all route pages/[...params].tsx is triggered where params=['api','auth','google']. Manually entering api/auth/google in the browser however correctly triggers the API route.
Additionally, this issue seems to happen only in production (Vercel deployment).
Paste all your error logs here:
No errors
Paste all relevant code snippets here:
PASTE_HERE (leave the ``` marks)
What are detailed steps to reproduce this?
Create pages/[...params].tsx
Create API route.
Deploy to production (Vercel).
Redirect to API routes using anchor tag or Router.
What is the problem?
I have a catch-all route in the
pages
folder:pages/[...params].tsx
. Now, when I have an anchor tag pointing to my api routes (e.g.api/auth/google
) or if I doRouter.replace(/api/auth/google)
the catch-all routepages/[...params].tsx
is triggered whereparams=['api','auth','google']
. Manually enteringapi/auth/google
in the browser however correctly triggers the API route. Additionally, this issue seems to happen only in production (Vercel deployment).Paste all your error logs here:
No errors
Paste all relevant code snippets here:
What are detailed steps to reproduce this?
pages/[...params].tsx
Run
blitz -v
and paste the output here:Please include below any other applicable logs and screenshots that show your problem:
No response