Completely Disable custom domain check when not enabled

This commit is contained in:
Julien Nahum 2024-02-05 14:02:20 +01:00
parent 4ae0e7fa68
commit d1dc4fda56
2 changed files with 2 additions and 1 deletions

View File

@ -4,7 +4,7 @@ NUXT_PUBLIC_API_BASE=http://localhost/api
NUXT_PUBLIC_AI_ENABLED=false NUXT_PUBLIC_AI_ENABLED=false
NUXT_PUBLIC_AMPLITUDE_CODE= NUXT_PUBLIC_AMPLITUDE_CODE=
NUXT_PUBLIC_CRISP_WEBSITE_ID= NUXT_PUBLIC_CRISP_WEBSITE_ID=
NUXT_PUBLIC_CUSTOM_DOMAINS_ENABLED=false NUXT_PUBLIC_CUSTOM_DOMAINS_ENABLED=
NUXT_PUBLIC_ENV=local NUXT_PUBLIC_ENV=local
NUXT_PUBLIC_GOOGLE_ANALYTICS_CODE= NUXT_PUBLIC_GOOGLE_ANALYTICS_CODE=
NUXT_PUBLIC_H_CAPTCHA_SITE_KEY= NUXT_PUBLIC_H_CAPTCHA_SITE_KEY=

1
client/lib/utils.js vendored
View File

@ -90,6 +90,7 @@ export const getDomain = function (url) {
*/ */
export const customDomainUsed = function() { export const customDomainUsed = function() {
const config = useRuntimeConfig() const config = useRuntimeConfig()
if (!config.public.customDomainsEnabled) return false
const appDomain = getDomain(config.public.appUrl) const appDomain = getDomain(config.public.appUrl)
const host = getHost() const host = getHost()