diff --git a/pages/[...slug].vue b/pages/[...slug].vue index 94b29e9..0649a6c 100644 --- a/pages/[...slug].vue +++ b/pages/[...slug].vue @@ -13,7 +13,8 @@ definePageMeta({ // Roadiz handles the routing defineI18nRoute(false) -const { webResponse, item, error, headers, alternateLinks } = await useRoadizWebResponse() +const route = useRoute() +const { webResponse, item, error, headers, alternateLinks } = await useRoadizWebResponse(route.path) if (error) { showError(error) @@ -28,8 +29,6 @@ useCacheTags(headers?.[useRuntimeConfig().public.cacheTags?.key]) // Cache control useWebResponseCacheControl(webResponse) -const route = useRoute() - // Force redirect when web response URL is not matching current route path if (item?.url && item.url !== route.path) { await navigateTo({ path: item?.url }, { redirectCode: 301 })