mirror of
https://github.com/modrinth/code.git
synced 2026-08-28 18:45:15 +00:00
frontend deployment changes & stop prerendering (#7227)
* feat: frontend docker image * build: tweak gc, disable prerendering * feat: pass along UA * fix: fallback to process.env * build: remove this pr branch test * fix: don't pin docker image ver
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { tryUseNuxtApp } from '#imports'
|
||||
|
||||
// Nuxt's `useRequestHeaders` throws outside of a setup context, and `useBaseFetch` is
|
||||
// called from plenty of places that no longer have one.
|
||||
export function useVisitorUserAgent(): string | undefined {
|
||||
if (!import.meta.server) return undefined
|
||||
|
||||
return tryUseNuxtApp()?.ssrContext?.event?.node?.req?.headers['user-agent']
|
||||
}
|
||||
Reference in New Issue
Block a user