Set the domain only during dns setup
If we change the domain when dns settings are changed, then migration fails because we callout to appstore API via the domain (for example, backup url call will fail because it uses the new domain name).
This commit is contained in:
@@ -88,6 +88,9 @@ function dnsSetup(req, res, next) {
|
||||
|
||||
if (typeof req.body.provider !== 'string') return next(new HttpError(400, 'provider is required'));
|
||||
if (config.fqdn()) return next(new HttpError(409, 'Already setup'));
|
||||
if (typeof req.body.domain !== 'string' || !req.body.domain) return next(new HttpError(400, 'domain is required'));
|
||||
|
||||
config.set('fqdn', req.body.domain);
|
||||
|
||||
settings.setDnsConfig(req.body, function (error) {
|
||||
if (error && error.reason === SettingsError.BAD_FIELD) return next(new HttpError(400, error.message));
|
||||
|
||||
Reference in New Issue
Block a user