Skip to content

Commit 0edfeb4

Browse files
committed
chore: pass initialHeaders
1 parent 488b305 commit 0edfeb4

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

nuxt.config.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -324,17 +324,11 @@ interface ISRConfigOptions {
324324
function getISRConfig(expirationSeconds: number, options: ISRConfigOptions = {}) {
325325
if (options.fallback) {
326326
return {
327-
...(options.fallback === 'json'
328-
? {
329-
headers: {
330-
'content-type': 'application/json',
331-
},
332-
}
333-
: {}),
334327
isr: {
335328
expiration: expirationSeconds,
336329
fallback:
337330
options.fallback === 'html' ? 'spa.prerender-fallback.html' : 'payload-fallback.json',
331+
initialHeaders: options.fallback === 'json' ? { 'content-type': 'application/json' } : {},
338332
} as { expiration: number },
339333
}
340334
}

vercel.json

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,5 @@
8282
],
8383
"destination": "https://github.com/npmx-dev/npmx.dev/blob/main/LICENSE"
8484
}
85-
],
86-
"headers": [
87-
{
88-
"source": "/:path*_payload.json",
89-
"headers": [
90-
{
91-
"key": "Content-Type",
92-
"value": "application/json"
93-
}
94-
]
95-
}
9685
]
9786
}

0 commit comments

Comments
 (0)