You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! Thanks for the amazing package at first, really clean, ts, just magic!
I was trying in a fresh project on the latest next canary, while everything looks like working at glance, it seems like images being served from Next Images component are having issues, because the middleware actually looks for the original url path.
So lets say you have : "public/one.png" , thats the actual URL that arrives at the middleware and not "_next/images?url..."
For me it seems like next middleware should exclude public assets by default, but there should be reason why they didnt :p
Im not sure if this an actual upstream issue, but just wanted to mention i able to replicate this on your demo repo.
My suggestion for this would be either include the matches by default on your create middleware so users have a better DX by having stuff ignored out of the box.
That looks indeed like a Next.js issue, I don't think I can do anything at the library level apart from updating the matcher regex. The middleware API will also be updated in the v1 version which should be out soon, I'll include a I18nMiddleware.matcher field to make it easier.
Hey! Thanks for the amazing package at first, really clean, ts, just magic!
I was trying in a fresh project on the latest next canary, while everything looks like working at glance, it seems like images being served from Next Images component are having issues, because the middleware actually looks for the original url path.
So lets say you have : "public/one.png" , thats the actual URL that arrives at the middleware and not "_next/images?url..."
For me it seems like next middleware should exclude public assets by default, but there should be reason why they didnt :p
Im not sure if this an actual upstream issue, but just wanted to mention i able to replicate this on your demo repo.
My suggestion for this would be either include the matches by default on your create middleware so users have a better DX by having stuff ignored out of the box.
This seems related to vercel/next.js#36308 (comment)
The solution for me was updated the following on the middleware.ts
Next Version: ^13.4.17-canary.0
Router: App Router
The text was updated successfully, but these errors were encountered: