fix: opt in to import.meta.* properties (#364)

This commit is contained in:
Daniel Roe
2024-03-28 16:59:41 +00:00
committed by GitHub
parent 2191f46214
commit d9996e0d9d
25 changed files with 40 additions and 40 deletions

View File

@@ -1,6 +1,6 @@
export default defineNuxtRouteMiddleware((to, from) => {
if (process.client) return
if (import.meta.client) return
const config = useRuntimeConfig()
if (to.fullPath.startsWith('/api')) {

View File

@@ -23,7 +23,7 @@ export default defineNuxtRouteMiddleware((to, from) => {
const config = useRuntimeConfig()
const customDomainHeaderValue = useRequestHeaders()[customDomainHeaderName]
if (process.server && (!customDomainHeaderValue || customDomainHeaderValue !== getDomain(getHost()))) {
if (import.meta.server && (!customDomainHeaderValue || customDomainHeaderValue !== getDomain(getHost()))) {
return redirectToMainDomain( {
reason: 'header_mismatch',
customDomainHeaderValue: customDomainHeaderValue,