diff --git a/client/lib/utils.js b/client/lib/utils.js index 7d3df6f..e77e3ad 100644 --- a/client/lib/utils.js +++ b/client/lib/utils.js @@ -77,5 +77,10 @@ export const customDomainUsed = function() { const appDomain = getDomain(config.public.appUrl) const host = getHost() + console.debug('customDomainUsed', { + 'appDomain': appDomain, + 'host': host, + 'customDomain': host !== appDomain && getDomain(host) !== appDomain + }) return host !== appDomain && getDomain(host) !== appDomain } diff --git a/client/middleware/custom-domain.global.js b/client/middleware/custom-domain.global.js index d5711e9..df17179 100644 --- a/client/middleware/custom-domain.global.js +++ b/client/middleware/custom-domain.global.js @@ -26,6 +26,10 @@ export default defineNuxtRouteMiddleware((to, from) => { const customDomainHeaderValue = useRequestHeaders()[customDomainHeaderName] if (!customDomainHeaderValue || customDomainHeaderValue !== getDomain(getHost())) { // If custom domain header doesn't match, redirect + console.info('Custom domain header does not match, redirecting',{ + 'customDomainHeaderValue': customDomainHeaderValue, + 'host': getDomain(getHost()), + }) return redirectToMainDomain() }