diff --git a/src/views/domains.html b/src/views/domains.html index 899990a8a..6cbd601ad 100644 --- a/src/views/domains.html +++ b/src/views/domains.html @@ -100,6 +100,16 @@ +
+ +

Create app subdomains with a hyphen instead of real subdomains (instead of app.sub.domain.com -> app-sub.domain.com)

+
+ +
+
+
diff --git a/src/views/domains.js b/src/views/domains.js index 90a85bb2d..633befa70 100644 --- a/src/views/domains.js +++ b/src/views/domains.js @@ -103,6 +103,7 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat nameComUsername: '', provider: 'route53', zoneName: '', + hyphenatedSubdomains: false, tlsConfig: { provider: 'letsencrypt-prod' @@ -148,6 +149,8 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat $scope.domainConfigure.tlsConfig.provider = domain.tlsConfig.provider; $scope.domainConfigure.zoneName = domain.zoneName; + + $scope.domainConfigure.hyphenatedSubdomains = !!domain.config.hyphenatedSubdomains; } else { $scope.domainConfigure.adding = true; } @@ -161,8 +164,7 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat var provider = $scope.domainConfigure.provider; - var data = { - }; + var data = {}; // special case the wildcard provider if (provider === 'wildcard') { @@ -205,6 +207,8 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat data.username = $scope.domainConfigure.nameComUsername; } + data.hyphenatedSubdomains = $scope.domainConfigure.hyphenatedSubdomains; + var fallbackCertificate = null; if ($scope.domainConfigure.fallbackCert.certificateFile && $scope.domainConfigure.fallbackCert.keyFile) { fallbackCertificate = { @@ -262,6 +266,8 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat $scope.domainConfigure.tlsConfig.provider = 'letsencrypt-prod'; $scope.domainConfigure.zoneName = ''; + $scope.domainConfigure.hyphenatedSubdomains = false; + $scope.domainConfigureForm.$setPristine(); $scope.domainConfigureForm.$setUntouched(); }