From 12a9eda3cf2f1130c11030955d8745b9c3f3a410 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Fri, 9 Sep 2016 10:34:18 +0200 Subject: [PATCH] Improve custom domain check --- cloudron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudron.js b/cloudron.js index 3e9d8ba..5d2ac31 100644 --- a/cloudron.js +++ b/cloudron.js @@ -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; };