File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
packages/runtime/src/templates Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 1
1
import { PrerenderManifest } from 'next/dist/build'
2
2
import type { BaseNextResponse } from 'next/dist/server/base-http'
3
- import { NodeRequestHandler , Options } from 'next/dist/server/next-server'
3
+ import type { NodeRequestHandler , Options } from 'next/dist/server/next-server'
4
4
5
5
import {
6
6
netlifyApiFetch ,
@@ -54,17 +54,10 @@ const getNetlifyNextServer = (NextServer: NextServerType) => {
54
54
return
55
55
}
56
56
57
- // intercept requests for initial ISR renders and return static content
58
- // (we need to do this manually because we disable the Next.js cache)
59
- if ( headers [ 'x-nf-builder-cache' ] === 'miss' ) {
60
- const pagePath = this . getPagePath ( url , this . nextConfig . i18n ?. locales )
61
- return this . serveStatic ( req , res , pagePath )
62
- }
63
-
64
57
// force all standard requests to revalidate so that we always have fresh content
65
58
// (we handle caching with ODBs instead of stale-while-revalidate)
66
59
// eslint-disable-next-line no-underscore-dangle
67
- if ( ! headers . __prerender_bypass ) {
60
+ if ( headers [ 'x-nf-builder-cache' ] === 'revalidate' && ! headers . __prerender_bypass ) {
68
61
headers [ 'x-prerender-revalidate' ] = this . renderOpts . previewProps . previewModeId
69
62
}
70
63
You can’t perform that action at this time.
0 commit comments