chayns-api 3.6.0 → 3.6.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.
|
@@ -25,7 +25,8 @@ const TrustedDomainsPlugin = trustedDomains => {
|
|
|
25
25
|
name: 'trusted-domains',
|
|
26
26
|
async beforeRequest(args) {
|
|
27
27
|
const domains = await getTrustedDomains();
|
|
28
|
-
const
|
|
28
|
+
const scope = args.id.split('/')[0];
|
|
29
|
+
const remote = args.options.remotes.find(remote => (remote.alias || remote.name) === scope);
|
|
29
30
|
if (remote && 'entry' in remote) {
|
|
30
31
|
const parsed = new URL(remote.entry);
|
|
31
32
|
if (!domains.some(domain => parsed.hostname.endsWith(domain))) {
|
|
@@ -21,7 +21,8 @@ export const TrustedDomainsPlugin = trustedDomains => {
|
|
|
21
21
|
name: 'trusted-domains',
|
|
22
22
|
async beforeRequest(args) {
|
|
23
23
|
const domains = await getTrustedDomains();
|
|
24
|
-
const
|
|
24
|
+
const scope = args.id.split('/')[0];
|
|
25
|
+
const remote = args.options.remotes.find(remote => (remote.alias || remote.name) === scope);
|
|
25
26
|
if (remote && 'entry' in remote) {
|
|
26
27
|
const parsed = new URL(remote.entry);
|
|
27
28
|
if (!domains.some(domain => parsed.hostname.endsWith(domain))) {
|