fix: don't rewrite helm chart URLs pointing to a different host
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful

When a helm chart index has download URLs on a different host than the
remote's base URL (e.g. charts hosted on intel.github.io but downloads
on github.com), the URL rewriting would produce broken proxy URLs.

Now URLs with a different host are left as-is so helm downloads
directly from the source. Same-host URLs are still rewritten through
the proxy as before.

Also fixes the route prefix to use /local/ for local members.
This commit is contained in:
2026-06-26 23:30:02 +10:00
parent 74d9c0fa84
commit eaa34ec05e
3 changed files with 29 additions and 4 deletions
+2 -2
View File
@@ -79,7 +79,7 @@ func (e *Engine) fetchMemberIndexes(ctx context.Context, virt models.Virtual, pa
results[idx] = result{err: fmt.Errorf("local index %q: %w", name, err)}
return
}
results[idx] = result{index: MemberIndex{RemoteName: name, RepoType: remote.RepoType, Body: body}}
results[idx] = result{index: MemberIndex{RemoteName: name, RepoType: remote.RepoType, BaseURL: remote.BaseURL, Body: body}}
return
}
@@ -102,7 +102,7 @@ func (e *Engine) fetchMemberIndexes(ctx context.Context, virt models.Virtual, pa
return
}
results[idx] = result{index: MemberIndex{RemoteName: name, RepoType: remote.RepoType, Body: body}}
results[idx] = result{index: MemberIndex{RemoteName: name, RepoType: remote.RepoType, BaseURL: remote.BaseURL, Body: body}}
}(i, memberName)
}