rsnext/examples/api-routes-cors/next-env.d.ts
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

5 lines
201 B
TypeScript

/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.