#No but you could apply it to middleware
1 messages · Page 1 of 1 (latest)
Hi @feral mist. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Sorry @feral mist, I seem to be having a bit of trouble. Don't worry though, I've pinged my supprt and they will try to fix me up! :technologist:
Perhaps try again in 15mins?
thanks , learning NextJS 13 at the moment , i did see this mentioned int eh docs
https://nextjs.org/docs/app/building-your-application/routing/router-handlers#cors
But its doesnt have path isolation i take it
Use middleware for intercepting routes, route handlers resolve on that path.
https://nextjs.org/docs/app/building-your-application/routing/middleware
kinda like putting it in the api folder
so I can put https://github.com/vercel/next.js/blob/canary/examples/api-routes-cors/pages/api/cors.ts
in my middleware.ts , and it should suffice ?
Do you need those endpoints for external apps?
yes , i am learning rest api dev , and will need , (get post put delete)
I would put it on a folder path that's specific to that public endpoint to keep it separate from the rest of your data fetching