File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ const makeHandler =
123
123
let maxAge
124
124
for ( const part of parts ) {
125
125
const [ key , value ] = part . split ( '=' )
126
- if ( key ?. trim ( ) === 's-max-age ' ) {
126
+ if ( key ?. trim ( ) === 's-maxage ' ) {
127
127
maxAge = value ?. trim ( )
128
128
}
129
129
}
@@ -166,6 +166,8 @@ const makeHandler =
166
166
167
167
// Sending SWR headers causes undefined behaviour with the Netlify CDN
168
168
const cacheHeader = multiValueHeaders [ 'cache-control' ] ?. [ 0 ]
169
+ multiValueHeaders [ 'x-next-cache-header' ] = [ cacheHeader || '' ]
170
+
169
171
if ( cacheHeader ?. includes ( 'stale-while-revalidate' ) ) {
170
172
if ( mode === 'odb' && process . env . EXPERIMENTAL_ODB_TTL ) {
171
173
mode = 'isr'
@@ -174,7 +176,7 @@ const makeHandler =
174
176
175
177
// Long-expiry TTL is basically no TTL
176
178
if ( ttl > 0 && ttl < ONE_YEAR_IN_SECONDS ) {
177
- result . ttl = Math . min ( ttl , 60 )
179
+ result . ttl = ttl
178
180
multiValueHeaders [ 'x-ttl-result' ] = [ result . ttl ]
179
181
}
180
182
}
You can’t perform that action at this time.
0 commit comments