Improve custom domain check

This commit is contained in:
Johannes Zellner 2016-09-09 10:34:18 +02:00
parent 5450d2abaf
commit 12a9eda3cf
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ function Cloudron(box) {
}
Cloudron.prototype._setDomain = function (domain) {
this._isCustomDomain = domain === process.env.CUSTOM_DOMAIN || domain === process.env.SELFHOST_DOMAIN;
this._isCustomDomain = !domain.match(/.*\.cloudron\.(me|eu|de)$/);
this._adminFqdn = this._isCustomDomain ? 'my.' + domain : 'my-' + domain;
this._origin = this._isCustomDomain ? 'https://my.' + domain : 'https://my-' + domain;
};