secure API using middleware | NextJS

yeah, how?
1 Reply
xyzmani
xyzmaniOP2w ago
so I have a API at /api/client/ I don't want anyone to access it unless authorised if I set the middleware to don't allow /api/* then my login doesn't work so I'm kinda stuck. chatgpt is giving out dogshit replies and google just tells me how to secure paths and not APIs routes

Did you find this page helpful?