fix: don't rewrite helm chart URLs pointing to a different host #56

Merged
benvin merged 1 commits from benvin/fix-helm-cross-host-urls into master 2026-06-26 23:34:00 +10:00
Owner

Problem

Helm charts like Intel device plugins have download URLs on github.com but the chart index is served from intel.github.io. The merger rewrites all URLs through the proxy, constructing:

https://artifactapi/api/v1/remote/intel-helm/intel/helm-charts/releases/download/...

Which proxies to https://intel.github.io/helm-charts/intel/helm-charts/releases/download/... — a 404.

Fix

Compare the download URL host against the remote's base URL host. If they differ, leave the URL as-is so helm downloads directly from the source. Same-host URLs are still rewritten through the proxy.

Also adds BaseURL to MemberIndex so the merger has the context it needs, and uses the correct /local/ vs /remote/ route prefix.

## Problem Helm charts like Intel device plugins have download URLs on `github.com` but the chart index is served from `intel.github.io`. The merger rewrites all URLs through the proxy, constructing: ``` https://artifactapi/api/v1/remote/intel-helm/intel/helm-charts/releases/download/... ``` Which proxies to `https://intel.github.io/helm-charts/intel/helm-charts/releases/download/...` — a 404. ## Fix Compare the download URL host against the remote's base URL host. If they differ, leave the URL as-is so helm downloads directly from the source. Same-host URLs are still rewritten through the proxy. Also adds `BaseURL` to `MemberIndex` so the merger has the context it needs, and uses the correct `/local/` vs `/remote/` route prefix.
unkinben added 1 commit 2026-06-26 23:30:18 +10:00
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
eaa34ec05e
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.
benvin merged commit 847eeb839f into master 2026-06-26 23:34:00 +10:00
benvin deleted branch benvin/fix-helm-cross-host-urls 2026-06-26 23:34:01 +10:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/artifactapi#56