Closed EAlf91 closed 4 months ago
Are you running on windows? Open-next don't work well there, you need to use WSL
@conico974 Thanks! Just deployed on wsl and it worked. Would have never guessed that this was the problem. You saved me tons of time. 👍 I'll close the issue
I've been struggling with this for a while now
I use latest nextjs 14 using the app router and put my middleware.ts into the root of my project as the documentation suggests.
When running npm run dev locally everything works fine and the middleware triggers.
But when running a deployment and I hit the cloudfront routes I just get routed through. No middleware is being triggered.
This is a serious issue as it makes secured routes public available.
This is my middleware setup: