mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
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]>
7 lines
184 B
JavaScript
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>
|
|
}
|