Skip to content

Commit

Permalink
Merge pull request #61 from golemfactory/feature/JST-482/Use-http-in-…
Browse files Browse the repository at this point in the history
…manifest

feat: use http instead of https in image url
  • Loading branch information
cryptobench authored Oct 18, 2023
2 parents 838954e + 0dacbb6 commit 31e506a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/manifest/manifest-create.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import fetch from "node-fetch";
import { DateTime } from "luxon";
import { findAsync } from "new-find-package-json";

const repoUrl = "https://registry.golem.network";
const repoUrl = "http://registry.golem.network";

type ImageInfo = {
url: string;
Expand All @@ -28,15 +28,16 @@ async function resolveTaskPackageUrl(tag: string): Promise<ImageInfo> {
const data = (await response.json()) as { https: string; http: string; sha3: string };

return {
url: data.https,
// url: data.https,
url: data.http,
hash: `sha3:${data.sha3}`,
};
}

async function getImageUrlFromTag(tag: string, providedHash?: string): Promise<ImageInfo> {
if (providedHash) {
return {
url: `${repoUrl}/v1/image/download?tag=${tag}&https=true`,
url: `${repoUrl}/v1/image/download?tag=${tag}', //&https=true`,
hash: providedHash,
};
}
Expand Down Expand Up @@ -81,7 +82,7 @@ async function getImageUrlFromUrl(url: string): Promise<ImageInfo> {

function getImageUrlFromHash(hash: string): ImageInfo {
return {
url: `${repoUrl}/v1/image/download?hash=${hash}&https=true`,
url: `${repoUrl}/v1/image/download?hash=${hash}`, //&https=true`,
hash: `sha3:${hash}`,
};
}
Expand Down

0 comments on commit 31e506a

Please sign in to comment.