From 164b8c4ddd85aaabd4793b3ae979463146621155 Mon Sep 17 00:00:00 2001 From: Julien Nahum Date: Thu, 30 Nov 2023 11:31:56 +0100 Subject: [PATCH] Fix the custom domain default redirect --- resources/js/middleware/custom-domains.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/middleware/custom-domains.js b/resources/js/middleware/custom-domains.js index abfbe75..2438c3c 100644 --- a/resources/js/middleware/custom-domains.js +++ b/resources/js/middleware/custom-domains.js @@ -1,11 +1,11 @@ export default async (to, from, next) => { - if (!window.config.custom_domains) { + if (!window.config.custom_domains_enabled) { next() } const isCustomDomain = getDomain(window.location.href) !== getDomain(window.config.app_url) if (isCustomDomain && !['forms.show_public'].includes(to.name)) { // If route isn't a public form, redirect - window.location.href = 'https://opnform.com/' + window.location.href = 'https://opnform.com/?utm_source=failed_custom_domain_redirect' } else { next() }