From 539b45d3b0481d6d9fc8a19d4d1ef184be3cf30b Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Mon, 5 Sep 2016 17:39:10 -0700 Subject: [PATCH] Bypass DNS check for non-custom domains Part of #27 --- src/apptask.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/apptask.js b/src/apptask.js index b016c7778..906b46a3b 100644 --- a/src/apptask.js +++ b/src/apptask.js @@ -257,8 +257,9 @@ function registerSubdomain(app, callback) { subdomains.get(app.location, 'A', function (error, values) { if (error) return retryCallback(error); - // refuse to update any existing DNS record that we did not create - if (values.length !== 0 && !app.dnsRecordId) return retryCallback(null, new Error('DNS Record already exists')); + // refuse to update any existing DNS record for custom domains that we did not create + // note that the appstore sets up the naked domain for non-custom domains + if (config.isCustomDomain() && values.length !== 0 && !app.dnsRecordId) return retryCallback(null, new Error('DNS Record already exists')); if (_.isEqual(values, [ ip ])) return retryCallback(null, app.dnsRecordId); // in sync already