diff --git a/src/cutils/utils_images.c b/src/cutils/utils_images.c index c9d945a4fad883b13c3ced4577df84b3b423c054..4104beabb9efeb5f210527a02aa4673b0a1e791f 100644 --- a/src/cutils/utils_images.c +++ b/src/cutils/utils_images.c @@ -104,7 +104,7 @@ char *oci_host_from_mirror(const char *mirror) if (util_has_prefix(mirror, HTTPS_PREFIX)) { host = mirror + strlen(HTTPS_PREFIX); - } else if (util_has_prefix(mirror, HTTPS_PREFIX)) { + } else if (util_has_prefix(mirror, HTTP_PREFIX)) { host = mirror + strlen(HTTP_PREFIX); } diff --git a/src/image/oci/oci_pull.c b/src/image/oci/oci_pull.c index e2f6d3e5d5e0eb1061ba54a1c51e7b0431de00bd..2fbd425deb4f078095d235bf2a7638d61f8d2840 100644 --- a/src/image/oci/oci_pull.c +++ b/src/image/oci/oci_pull.c @@ -128,7 +128,7 @@ static int pull_image(const im_pull_request *request, char **name) } else { registry_mirrors = conf_get_registry_list(); for (mirror = registry_mirrors; (mirror != NULL) && (*mirror != NULL); mirror++) { - if (util_has_prefix(*mirror, HTTPS_PREFIX)) { + if (util_has_prefix(*mirror, HTTP_PREFIX)) { options->insecure_registry = true; } host = oci_host_from_mirror(*mirror);