From 0dc0a1baa6b1e758cbc04e048be3deedcf11b42f Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sun, 15 Jan 2023 14:43:16 +0000 Subject: [PATCH] refactor: use internal nuxt helper (#1176) --- plugins/social.server.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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