Max Proske
|
5145c2d5e2
|
chore(examples): Convert api-routes-cors example to TypeScript (#38356)
Convert `api-routes-cores` example to TypeScript to match Contribution docs.
- Update CORS configuration to match the [middleware Next.js docs](https://nextjs.org/docs/api-routes/api-middlewares#connectexpress-middleware-support)
- Allow POST requests as per instructions in `index.tsx`: "make a **POST** / GET / OPTIONS request to /api/cors"
## Documentation / Examples
- [X] Make sure the linting passes by running `pnpm lint`
- [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
|
2022-07-06 13:12:40 +00:00 |
|