Nuxt · NUXT0023
Forward auth headers for SSR server fetches
Finds Nuxt fetch code that can be written with a clearer framework-supported pattern.
nuxt/fetch/forward-auth-headers-ssrsrc/rule-packs/nuxt/rules/nuxt/forward-auth-headers-ssr.ts Upstream docs Run this rule
pnpm nuxt doctor --rules nuxt/fetch/forward-auth-headers-ssr
Why it matters
Server-rendered markup must match the first client render. Browser-only state, time, randomness, or hash-sensitive URLs can create hydration mismatches.
Recommended fix
Use the Nuxt-supported forward auth headers SSR pattern instead.
Useful links
Example
Forward selected auth headers
Before
const account = await $fetch('/api/account')
After
const account = await useRequestFetch()('/api/account')