Raw
1 A common mistake when creating middlewares is naming the file `middleware.ts` rather than `middlewares.ts`.
2
3 If your middleware isn't registered correctly, make sure you've created the middleware file at `src/api/middlewares.ts`.
4
5 Learn more in the [Middleware](!docs!/learn/fundamentals/api-routes/middlewares) documentation.