Files
224ca18992 remove unnecessary internal middleware header from response (#73482)
x-middleware-set-cookie is an internal header used by the middleware
handler and doesn't need to be forwarded onto the response.

this also adds handling to filter out internal request headers as they
aren't intended to be used externally.

---------

Co-authored-by: JJ Kasper <[email protected]>
2024-12-03 20:54:19 +00:00

7 lines
184 B
JavaScript

import { cookies } from 'next/headers'
export default async function Page() {
const cookieLength = (await cookies()).size
return <div id="cookies">cookies: {cookieLength}</div>
}