mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +00:00
fix(nuxt): pass original request headers to the error page (#7340)
This commit is contained in:
parent
fa36ef1106
commit
d82d145a0b
@ -45,7 +45,9 @@ export default <NitroErrorHandler> async function errorhandler (error: H3Error,
|
|||||||
|
|
||||||
// HTML response (via SSR)
|
// HTML response (via SSR)
|
||||||
const isErrorPage = event.req.url?.startsWith('/__nuxt_error')
|
const isErrorPage = event.req.url?.startsWith('/__nuxt_error')
|
||||||
let html = !isErrorPage ? await $fetch(withQuery('/__nuxt_error', errorObject)).catch(() => null) : null
|
let html = !isErrorPage ? await $fetch(withQuery('/__nuxt_error', errorObject), {
|
||||||
|
headers: event.req.headers,
|
||||||
|
}).catch(() => null) : null
|
||||||
|
|
||||||
// Fallback to static rendered error page
|
// Fallback to static rendered error page
|
||||||
if (!html) {
|
if (!html) {
|
||||||
|
Loading…
Reference in New Issue
Block a user