cloudron 5.4.2 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/actions.js +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudron",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Cloudron Commandline Tool",
|
|
6
6
|
"main": "main.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"author": "Cloudron Developers <support@cloudron.io>",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"async": "^3.2.4",
|
|
21
|
-
"cloudron-manifestformat": "^5.
|
|
21
|
+
"cloudron-manifestformat": "^5.22.1",
|
|
22
22
|
"commander": "^9.5.0",
|
|
23
23
|
"debug": "^4.3.4",
|
|
24
24
|
"delay": "^5.0.0",
|
package/src/actions.js
CHANGED
|
@@ -109,9 +109,10 @@ async function selectDomain(location, options) {
|
|
|
109
109
|
|
|
110
110
|
let domain;
|
|
111
111
|
let subdomain = location;
|
|
112
|
-
|
|
112
|
+
// find longest matching domain name. this maps to DNS where subdomain is a zone of it's own
|
|
113
|
+
const matchingDomain = domains
|
|
113
114
|
.map(function (d) { return d.domain; } )
|
|
114
|
-
.sort(function(a, b) { return
|
|
115
|
+
.sort(function(a, b) { return b.length - a.length; })
|
|
115
116
|
.find(function (d) { return location.endsWith(d); });
|
|
116
117
|
|
|
117
118
|
if (matchingDomain) {
|
|
@@ -120,7 +121,7 @@ async function selectDomain(location, options) {
|
|
|
120
121
|
} else { // use the admin domain
|
|
121
122
|
domain = domains
|
|
122
123
|
.map(function (d) { return d.domain; } )
|
|
123
|
-
.sort(function(a, b) { return
|
|
124
|
+
.sort(function(a, b) { return b.length - a.length; })
|
|
124
125
|
.find(function (d) { return adminFqdn.endsWith(d); });
|
|
125
126
|
}
|
|
126
127
|
|