fix authentication on extended checks

This commit is contained in:
Karol Wypchlo 2022-01-25 00:31:21 +01:00
parent b5d1bb2d63
commit 76f0a6d084
No known key found for this signature in database
GPG Key ID: B515DE9EEBE241E1
1 changed files with 1 additions and 1 deletions

View File

@ -1173,7 +1173,7 @@ async function skylinkVerification(done, expected, { followRedirect = true, meth
const skylink = parseSkylink(expected.skylink); const skylink = parseSkylink(expected.skylink);
const url = `${process.env.SKYNET_PORTAL_API}/skynet/metadata/${skylink}`; const url = `${process.env.SKYNET_PORTAL_API}/skynet/metadata/${skylink}`;
try { try {
const metadata = await got(url).json(); const metadata = await got(url, { headers: { cookie: `nocache=true;${authCookie}` } }).json();
if (!isEqual(expected.metadata, metadata)) { if (!isEqual(expected.metadata, metadata)) {
entry.up = false; entry.up = false;
info.metadata = { url, diff: ensureValidJSON(detailedDiff(expected.metadata, metadata)) }; info.metadata = { url, diff: ensureValidJSON(detailedDiff(expected.metadata, metadata)) };