From 5035ef4ee8c8e177ffac26e1e2b35927ff841c72 Mon Sep 17 00:00:00 2001 From: Ivan Miletic Date: Thu, 20 Aug 2026 13:42:39 +0200 Subject: [PATCH] fix: download relative artifact URLs against the API base The sync response's relative artifact path is relative to the API base, but the download stripped the /api suffix before appending it, so the request hit the frontend SPA fallback and saved index.html as the artifact with exit 0. Unnoticed on GoRules cloud, which normally hands out absolute signed CDN URLs; any deployment taking the relative fallback (self-hosted without CDN) was affected. Co-Authored-By: Claude Fable 5 --- src/api/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/client.ts b/src/api/client.ts index 8d93ec8..5f7a534 100644 --- a/src/api/client.ts +++ b/src/api/client.ts @@ -142,7 +142,7 @@ export const sync = async (options: ApiOptions, deployments: SyncDeploymentReque */ export const downloadArtifact = async (options: ApiOptions, artifact: SyncArtifact): Promise => { const isRelative = artifact.url.startsWith('/'); - const url = isRelative ? `${options.url.replace(/\/api$/, '')}${artifact.url}` : artifact.url; + const url = isRelative ? `${options.url}${artifact.url}` : artifact.url; const response = await fetchWithRetry( url,