Within the Nuxt context you can use useRequestEvent to access the incoming request.
useRequestEvent
// Get underlying request event const event = useRequestEvent() // Get the URL const url = event?.path
undefined
usePreviewMode
Use usePreviewMode to check and control preview mode in Nuxt
useRequestFetch
Forward the request context and headers for server-side fetch requests with the useRequestFetch composable.
Community