MCPcopy
hub / github.com/larksuite/cli / assertAllowedHost

Function assertAllowedHost

scripts/install.js:99–104  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

97}
98
99function assertAllowedHost(url) {
100 const { hostname } = new URL(url);
101 if (!ALLOWED_HOSTS.has(hostname)) {
102 throw new Error(`Download host not allowed: ${hostname}`);
103 }
104}
105
106// Resolve the mirror URL chain and admit each host. Called from install() so
107// derived hosts only become trusted when actually needed.

Callers 2

downloadFunction · 0.85
install.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected