From 109d56ccaa7ca7a67d755df1e98b54b645804892 Mon Sep 17 00:00:00 2001 From: Alec Reynolds <alec+git@lando.dev> Date: Wed, 9 Oct 2024 13:25:18 -0700 Subject: [PATCH] lando/lando#3744: Check to make sure default url isn't being overridden in proxy settings. --- builders/_drupaly.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/builders/_drupaly.js b/builders/_drupaly.js index 71bf1f0..ae57bb0 100644 --- a/builders/_drupaly.js +++ b/builders/_drupaly.js @@ -189,8 +189,12 @@ const getDbTooling = database => { const getProxy = (options, proxyService = 'appserver') => { // get any intial proxy stuff for proxyService const urls = _.get(options, `_app.config.proxy.${proxyService}`, []); - // add - urls.push(`${options.app}.${options._app._config.domain}`); + + // if urls doesn't have the lando generated domain, add it in + if (!_.find(urls, {hostname: `${options.app}.${options._app._config.domain}`})) { + urls.push({hostname: `${options.app}.${options._app._config.domain}`}); + } + // return return {[proxyService]: _.uniq(_.compact(urls))}; };