Skip to content

Commit 9d50c0b

Browse files
gnoffeps1lon
authored andcommitted
Strip next-resume header from incoming requests (#92)
This header is used by proxies to perform a concatenating resume render for partial prerendering. It is never sent from the client so we can filter it out when running in a mode that does not have an intermediate proxy.
1 parent df7ab5a commit 9d50c0b

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

packages/next/src/server/lib/server-ipc/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const INTERNAL_HEADERS = [
5050
'x-matched-path',
5151
'x-nextjs-data',
5252
'x-next-resume-state-length',
53+
'next-resume',
5354
]
5455

5556
export const filterInternalHeaders = (

test/production/app-dir/max-postponed-state-size/max-postponed-state-size.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { nextTestSetup } from 'e2e-utils'
33
describe('app-dir - max postponed state size', () => {
44
const { next } = nextTestSetup({
55
files: __dirname,
6+
env: {
7+
NEXT_PRIVATE_TEST_HEADERS: '1',
8+
},
69
})
710

811
it('should return 413 when next-resume request exceeds max postponed state size', async () => {

0 commit comments

Comments
 (0)