Nuxt · NUXT0023

Forward auth headers for SSR server fetches

Finds Nuxt fetch code that can be written with a clearer framework-supported pattern.
NUXT0023vite-doctor/nuxtfetchingwarnSuggestion

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.

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')
Copyright © 2026