mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
## Why? When we just have a POST route handler, it seems CORs is not working properly. This is because we break out of the loop here https://github.com/vercel/next.js/blob/768a92b15bd72002df0f9f893d78e094a8e3165f/packages/next/src/server/future/route-modules/app-route/helpers/auto-implement-methods.ts#L38 when a `GET` isn't present before we add the correct headers and status to the preflight `OPTION`. - Closes https://github.com/vercel/next.js/issues/57999 Closes NEXT-2813 --------- Co-authored-by: JJ Kasper <[email protected]>
4 lines
146 B
TypeScript
4 lines
146 B
TypeScript
// This route exports POST. The test verifies that this route
|
|
// will handle the OPTIONS request.
|
|
export { POST } from '../../../handlers/hello'
|