A simple example of how to configure CORS in a NextJS 13 app using AppRouter.
This repo is part of tutorial article. You can find the Medium article here: NextJS 13 AppRouter Tutorial
- NVM or NodeJS v18.17.1
- pnpm
#FROM: /
pnpm install
#FROM: /
pnpm dev
#FROM: /
pnpm client
You can find those cors configurations in next.config.js
.
You can find those cors configurations in pages/api/users/route.ts
.
You can find those cors configurations in middleware.ts
.
built by @codingwithmanny