File tree Expand file tree Collapse file tree 6 files changed +6
-23
lines changed
Expand file tree Collapse file tree 6 files changed +6
-23
lines changed Original file line number Diff line number Diff line change @@ -387,7 +387,6 @@ async function exportAppImpl(
387387 strictNextHead : nextConfig . experimental . strictNextHead ?? true ,
388388 deploymentId : nextConfig . deploymentId ,
389389 htmlLimitedBots : nextConfig . htmlLimitedBots . source ,
390- streamingMetadata : true ,
391390 experimental : {
392391 clientTraceMetadata : nextConfig . experimental . clientTraceMetadata ,
393392 expireTime : nextConfig . expireTime ,
Original file line number Diff line number Diff line change @@ -62,7 +62,6 @@ export interface ExportPageInput {
6262 nextConfigOutput ?: NextConfigComplete [ 'output' ]
6363 enableExperimentalReact ?: boolean
6464 sriEnabled : boolean
65- streamingMetadata : boolean | undefined
6665}
6766
6867export type ExportRouteResult =
Original file line number Diff line number Diff line change @@ -256,9 +256,7 @@ async function exportPageImpl(
256256 // During the export phase in next build, if it's using PPR we can serve streaming metadata
257257 // when it's available. When we're building the PPR rendering result, we don't need to rely
258258 // on the user agent. The result can be determined to serve streaming on infrastructure level.
259- const serveStreamingMetadata = Boolean (
260- isRoutePPREnabled && input . streamingMetadata
261- )
259+ const serveStreamingMetadata = ! ! isRoutePPREnabled
262260
263261 const renderOpts : WorkerRenderOpts = {
264262 ...components ,
@@ -425,7 +423,6 @@ export async function exportPages(
425423 enableExperimentalReact : needsExperimentalReact ( nextConfig ) ,
426424 sriEnabled : Boolean ( nextConfig . experimental . sri ?. algorithm ) ,
427425 buildId : input . buildId ,
428- streamingMetadata : true ,
429426 } ) ,
430427 // If exporting the page takes longer than the timeout, reject the promise.
431428 new Promise ( ( _ , reject ) => {
Original file line number Diff line number Diff line change @@ -204,7 +204,6 @@ export interface RenderOptsPartial {
204204 params ?: ParsedUrlQuery
205205 isPrefetch ?: boolean
206206 htmlLimitedBots : string | undefined
207- streamingMetadata : boolean
208207 experimental : {
209208 /**
210209 * When true, it indicates that the current page supports partial
Original file line number Diff line number Diff line change @@ -600,7 +600,6 @@ export default abstract class Server<
600600 isExperimentalCompile : this . nextConfig . experimental . isExperimentalCompile ,
601601 // `htmlLimitedBots` is passed to server as serialized config in string format
602602 htmlLimitedBots : this . nextConfig . htmlLimitedBots ,
603- streamingMetadata : true ,
604603 experimental : {
605604 expireTime : this . nextConfig . expireTime ,
606605 clientTraceMetadata : this . nextConfig . experimental . clientTraceMetadata ,
@@ -1761,10 +1760,10 @@ export default abstract class Server<
17611760 ...this . renderOpts ,
17621761 supportsDynamicResponse : ! isBotRequest ,
17631762 botType : getBotType ( ua ) ,
1764- serveStreamingMetadata : shouldServeStreamingMetadata ( ua , {
1765- streamingMetadata : ! ! this . renderOpts . streamingMetadata ,
1766- htmlLimitedBots : this . nextConfig . htmlLimitedBots ,
1767- } ) ,
1763+ serveStreamingMetadata : shouldServeStreamingMetadata (
1764+ ua ,
1765+ this . nextConfig . htmlLimitedBots
1766+ ) ,
17681767 } ,
17691768 }
17701769
Original file line number Diff line number Diff line change @@ -6,18 +6,8 @@ import type { BaseNextRequest } from '../base-http'
66
77export function shouldServeStreamingMetadata (
88 userAgent : string ,
9- {
10- streamingMetadata,
11- htmlLimitedBots,
12- } : {
13- streamingMetadata : boolean
14- htmlLimitedBots : string | undefined
15- }
9+ htmlLimitedBots : string | undefined
1610) : boolean {
17- if ( ! streamingMetadata ) {
18- return false
19- }
20-
2111 const blockingMetadataUARegex = new RegExp (
2212 htmlLimitedBots || HTML_LIMITED_BOT_UA_RE_STRING ,
2313 'i'
You can’t perform that action at this time.
0 commit comments