From bd5fa87997080f4176e3260bba706b1d5c2331dc Mon Sep 17 00:00:00 2001 From: Julien Nahum Date: Tue, 16 Jan 2024 17:56:39 +0100 Subject: [PATCH] Fix custom domain --- client/middleware/custom-domain.global.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/middleware/custom-domain.global.js b/client/middleware/custom-domain.global.js index 6aad995..7a67842 100644 --- a/client/middleware/custom-domain.global.js +++ b/client/middleware/custom-domain.global.js @@ -23,7 +23,7 @@ export default defineNuxtRouteMiddleware((to, from) => { const config = useRuntimeConfig() const customDomainHeaderValue = useRequestHeaders()[customDomainHeaderName] - if (!customDomainHeaderValue || customDomainHeaderValue !== getDomain(getHost())) { + if (process.server && (!customDomainHeaderValue || customDomainHeaderValue !== getDomain(getHost()))) { return redirectToMainDomain( { reason: 'header_mismatch', customDomainHeaderValue: customDomainHeaderValue,