@wtfalch/foundry 0.25.0 → 0.25.1
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/dist/org.js +4 -4
- package/package.json +1 -1
package/dist/org.js
CHANGED
|
@@ -179,7 +179,7 @@ export function validateHosting(hosting, names) {
|
|
|
179
179
|
const ACCESS_RULE_HOSTNAME = /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)+$/;
|
|
180
180
|
/**
|
|
181
181
|
* The rules for one {@link AccessRule}; `null` when it is valid. The hostname
|
|
182
|
-
* must be
|
|
182
|
+
* must be the org's domain or a name under it, and never a locked one;
|
|
183
183
|
* without `names` only the checks that need no domain run.
|
|
184
184
|
*/
|
|
185
185
|
function validateAccessRule(rule, hosting, names) {
|
|
@@ -201,11 +201,11 @@ function validateAccessRule(rule, hosting, names) {
|
|
|
201
201
|
return `${at} is a name foundry owns`;
|
|
202
202
|
}
|
|
203
203
|
const { domain } = names;
|
|
204
|
+
// Any name under the domain: `share.<domain>` and `storage.<domain>` are
|
|
205
|
+
// served for the org by the files service, not by one of its entries.
|
|
204
206
|
const served = hosting.usesDomain &&
|
|
205
207
|
domain !== null &&
|
|
206
|
-
|
|
207
|
-
? rule.hostname.endsWith(`.${domain}`)
|
|
208
|
-
: rule.hostname === (name === '@' ? domain : `${name}.${domain}`)));
|
|
208
|
+
(rule.hostname === domain || rule.hostname.endsWith(`.${domain}`));
|
|
209
209
|
if (!served) {
|
|
210
210
|
return `${at} is not a name the org serves under its own domain`;
|
|
211
211
|
}
|