Skip to content

Commit

Permalink
Update packages/next/server/next-server.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
javivelasco committed Nov 12, 2021
1 parent 7f14a14 commit e7c50d8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/next/server/next-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,9 @@ export default class Server {
})

for (let [key, value] of result.response.headers) {
// Do not accumulate "next" header so that chaining middlewares can intercept
if (key === 'x-middleware-next') continue
allHeaders.append(key, value)
if (key !== 'x-middleware-next') {
allHeaders.append(key, value)
}
}

if (!this.renderOpts.dev) {
Expand Down

0 comments on commit e7c50d8

Please sign in to comment.