rsnext/test/e2e/app-dir/app-routes
Sam Ko 0a697cf044
fix(route-handlers): make sure preflight has CORS headers (#63264)
## 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
768a92b15b/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 <jj@jjsweb.site>
2024-03-14 00:59:57 +00:00
..
app fix(route-handlers): make sure preflight has CORS headers (#63264) 2024-03-14 00:59:57 +00:00
handlers Ensure WebSocket is polyfilled for node runtime as well (#48924) 2023-04-28 15:48:14 -05:00
app-custom-route-base-path.test.ts Support basePath with edge runtime for Custom App Routes (#52910) 2023-07-19 23:54:34 +00:00
app-custom-routes.test.ts fix(route-handlers): make sure preflight has CORS headers (#63264) 2024-03-14 00:59:57 +00:00
helpers.ts Loose types of app routes return value (#55849) 2023-09-25 11:34:21 +02:00
next.config.js Loose types of app routes return value (#55849) 2023-09-25 11:34:21 +02:00