Skip to content

SpellcraftAI/nextjs-cors-demo

Repository files navigation

Next.js Edge Runtime: CORS Demo

Demos nextjs-edge-cors. See docs for more info.

// src/middleware.ts

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

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

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