An open API service indexing awesome lists of open source software.

https://github.com/spellcraftai/nextjs-cors-demo

A demo of CORS in Next.js Edge runtime.
https://github.com/spellcraftai/nextjs-cors-demo

Last synced: 10 months ago
JSON representation

A demo of CORS in Next.js Edge runtime.

Awesome Lists containing this project

README

          

# Next.js Edge Runtime: CORS Demo

Demos [`nextjs-edge-cors`](https://github.com/SpellcraftAI/nextjs-edge-cors).
See docs for more info.

```ts
// src/middleware.ts

import { CorsMiddleware } from "nextjs-edge-cors";

export const middleware = CorsMiddleware({
origin: "*"
})

export const config = {
matcher: ["/api/cors/:path*"]
};
```