sladg / nextjs-lambda

Lambda deployments for Nextjs12 & Nextjs13 (standalone). Easy CLI commands to get your standalone Next output to run in AWS Lambda (not @Edge)! Uses CDK in behind and produces code zips importable to Terraform, Serverless, Azure, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is middleware supported?

khuezy opened this issue · comments

I see a middleware checkmark in the list of features, but when I deploy the example: https://github.com/vercel/next.js/tree/canary/examples/middleware, it doesn't actually work.

Edit: it does work when you reload the browser, but using <Link />, it does not work.

commented

Hey! Yes, we tested middleware.ts on Next@12.3, and redirects worked fine, moreover, redirects also work by specifying them in next.config.js. Can you share your expected result compared to the current state? <Link/> is not used in middleware.ts, so I'm not 100% sure where to look.

Hi thanks for replying, redirect is working for me now. I must have messed up somewhere.