admin: use https endpoints for NPM registry
This commit is contained in:
parent
0a8be37b08
commit
b7e61bd67e
@ -15,7 +15,7 @@ async function getPackageInfo(name: string): Promise<any> {
|
||||
|
||||
if (!cache[name]) {
|
||||
try {
|
||||
const result = await getUrl("http:/" + "/registry.npmjs.org/" + name);
|
||||
const result = await getUrl("https:/\/registry.npmjs.org/" + name);
|
||||
cache[name] = JSON.parse(Buffer.from(result.body).toString("utf8"));
|
||||
} catch (error) {
|
||||
if (error.status === 404) { return null; }
|
||||
|
Loading…
Reference in New Issue
Block a user