Files
Zack TannerandGitHub 98d4bbaa49 add additional x-middleware-set-cookie filtering (#75561)
Previously when we removed this from the response we only did so for
requests that flowed through middleware and static handlers. We should
ensure it's filtered in `sendResponse` as well. The header is only
needed internally.
2025-02-03 12:58:27 -08:00

12 lines
200 B
JavaScript

import { NextResponse } from 'next/server'
export function GET() {
const response = new NextResponse()
response.cookies.set({
name: 'example',
value: 'example',
})
return response
}