Open jordanpurinton opened 8 months ago
I have been experiencing this issue since Next.js version 13. Has there been any progress on this matter?
Confirm I too see this. with no middleware.ts: 1 log with middleware.ts file with an empty function: 2 logs
@leerob
This seems to be fixed in 14.2.2
Link to the code that reproduces this issue
https://github.com/jordanpurinton/next-middleware-dupe-logging
To Reproduce
npm run dev
fullUrl: true
)Current vs. Expected behavior
This happens in a larger app I'm working on, but even using create next app I'm seeing duplicate logs for GET/POST requests on routes in my application when using middleware. This behavior seems to go away when turning off the middleware.
Why are these logs being omitted more than once? Ideally, I would only see one request being omitted in the logs, however there are multiple GET requests omitted.
Why is this the case when using middleware? Is there something I'm missing or misunderstanding here?
Provide environment information
Which area(s) are affected? (Select all that apply)
App Router, Middleware / Edge (API routes, runtime)
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context