{"library":"nextjs-cors","type":"library","category":null,"description":"CORS middleware for Next.js API routes, built on top of the popular Express cors package. Current stable version is 2.2.1, released as a patch update preparing for the next major version. Provides a simple, drop-in solution to enable Cross-Origin Resource Sharing in Next.js API routes with all standard cors options (methods, origin, allowed headers, etc.). Uses an async middleware pattern that fits naturally into Next.js API route handlers. Unlike generic cors packages, nextjs-cors is specifically designed for Next.js's request/response model and does not require wrapping or additional configuration to work with Edge Runtime (though support depends on underlying cors). Ships TypeScript definitions, making it easy to use in TS projects. Peer dependency on Next.js >=8.1.1-canary.54, ensuring compatibility with older versions. Compared to other Next.js CORS solutions like next-connect or manual headers, nextjs-cors offers a minimal API and leverages the well-tested cors package.","language":"javascript","status":"active","version":"2.2.1","tags":["javascript","nextjs-cors","next-cors","cors","nextjs","typescript"],"install":[{"cmd":"npm install nextjs-cors","imports":["import NextCors from 'nextjs-cors'","import NextCors from 'nextjs-cors'","const NextCors = require('nextjs-cors').default"]},{"cmd":"yarn add nextjs-cors","imports":[]},{"cmd":"pnpm add nextjs-cors","imports":[]}],"homepage":null,"github":"https://github.com/yonycalsin/nextjs-cors","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/nextjs-cors","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/nextjs-cors/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Fri Jul 24","install_tag":null}}