diff --git a/plugins/social.server.ts b/plugins/social.server.ts index d4f354ee..1bbf4421 100644 --- a/plugins/social.server.ts +++ b/plugins/social.server.ts @@ -7,8 +7,7 @@ export default defineNuxtPlugin(async (nuxtApp) => { if (!route.params.server) return - const req = nuxtApp.ssrContext!.event.node.req - const userAgent = req.headers['user-agent']! + const userAgent = useRequestHeaders()['user-agent'] if (!userAgent) return