Beautiful Open-Source Form Builder
Debugging custom domain
Julien Nahumc35c5051141e
diff --git a/client/lib/utils.js b/client/lib/utils.jsindex 7d3df6fff..e77e3ad0c 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.jsindex d5711e991..df171792d 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()}