Nuxt · Data fetching
NUXT0023Forward auth headers for SSR server fetches
Finds Nuxt fetch code that can be written with a clearer framework-supported pattern.
vite-doctor/nuxtfetchingwarnSuggestion
Why it happens
Server-rendered markup must match the first client render. Browser-only state, time, randomness, or hash-sensitive URLs can create hydration mismatches.
Fix
Use the Nuxt-supported forward auth headers SSR pattern instead.
Example
Forward selected auth headers
Before
const account = await $fetch('/api/account')
After
const account = await useRequestFetch()('/api/account')
Verify the fix
Run only this rule after editing so the report stays focused on the diagnostic you are closing:
pnpm nuxt doctor --rules nuxt/fetch/forward-auth-headers-ssr