fix: opt in to import.meta.* properties (#364)
This commit is contained in:
2
client/middleware/api-redirect.global.js
vendored
2
client/middleware/api-redirect.global.js
vendored
@@ -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')) {
|
||||
|
||||
2
client/middleware/custom-domain.global.js
vendored
2
client/middleware/custom-domain.global.js
vendored
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user