Skip to content

Commit

Permalink
fix: revert special test condition in header setting
Browse files Browse the repository at this point in the history
  • Loading branch information
wyattjoh committed Dec 13, 2023
1 parent 286b0ee commit 9ff9f39
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/next/src/server/base-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2800,13 +2800,8 @@ export default abstract class Server<ServerOptions extends Options = Options> {
res.statusCode = cachedData.status
}

// Mark that the request did postpone if this is a data request or we're
// testing. It's used to verify that we're actually serving a postponed
// request so we can trust the cache headers.
if (
cachedData.postponed &&
(isRSCRequest || process.env.__NEXT_TEST_MODE)
) {
// Mark that the request did postpone if this is a data request.
if (cachedData.postponed && isRSCRequest) {
res.setHeader(NEXT_DID_POSTPONE_HEADER, '1')
}

Expand Down

0 comments on commit 9ff9f39

Please sign in to comment.