fix: canonical and social URLs answered as paths become absolute on the request origin

This commit is contained in:
Jakub Zych
2026-10-31 13:53:30 +01:00
parent ac59f3c80d
commit 7d52c5d2e5
8 changed files with 192 additions and 32 deletions

View File

@@ -10,5 +10,6 @@ export default defineNuxtPlugin(() => {
const config = useRuntimeConfig()
if ((config.public.seo as { enabled?: boolean } | undefined)?.enabled === false) return
const answer = useSeoAnswer()
useHead(computed(() => seoHeadInput(answer.value)), { tagPriority: 'critical' })
const origin = useRequestURL().origin
useHead(computed(() => seoHeadInput(answer.value, origin)), { tagPriority: 'critical' })
})