1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-23 22:56:09 +09:00

refactor: use internal nuxt helper (#1176)

This commit is contained in:
Daniel Roe 2023-01-15 14:43:16 +00:00 committed by GitHub
parent 5a6248a08f
commit 0dc0a1baa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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