Merge pull request #1586 from SkynetLabs/fix-extended-authenticated-checks

fix authentication on extended checks
This commit is contained in:
Karol Wypchło 2022-01-25 00:33:39 +01:00 committed by GitHub
commit b419216c7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)) };