forked from Mirrors/elk
refactor: use internal nuxt helper (#1176)
This commit is contained in:
parent
5a6248a08f
commit
0dc0a1baa6
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue