From 9c0ba39ed6ff063a8001837b9a92f26150497905 Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Fri, 13 Feb 2026 19:01:31 -0300 Subject: [PATCH] fix(sync): disable cloud sync and truncate error logs CLOUD_URL was pointing to omniroute.com which doesn't have a /sync/ endpoint, causing repeated 404 HTML dumps in console logs. - Clear CLOUD_URL to disable cloud sync until server is ready - Truncate sync error text to 200 chars to prevent HTML spam in logs --- .env.example | 4 ++-- src/lib/cloudSync.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 52117815b5..1143388b65 100644 --- a/.env.example +++ b/.env.example @@ -30,10 +30,10 @@ REQUIRE_API_KEY=false # Must point to this running instance so internal sync jobs can call /api/sync/cloud. # Server-side preferred variables: BASE_URL=http://localhost:20128 -CLOUD_URL=https://omniroute.com +CLOUD_URL= # Backward-compatible/public variables: NEXT_PUBLIC_BASE_URL=http://localhost:20128 -NEXT_PUBLIC_CLOUD_URL=https://omniroute.com +NEXT_PUBLIC_CLOUD_URL= # Optional outbound proxy variables for upstream provider calls # Lowercase variants are also supported: http_proxy, https_proxy, all_proxy, no_proxy diff --git a/src/lib/cloudSync.js b/src/lib/cloudSync.js index 99eec2e508..d3915d9733 100644 --- a/src/lib/cloudSync.js +++ b/src/lib/cloudSync.js @@ -55,7 +55,8 @@ export async function syncToCloud(machineId, createdKey = null) { if (!response.ok) { const errorText = await response.text(); - console.log("Cloud sync failed:", errorText); + const truncated = errorText.length > 200 ? errorText.slice(0, 200) + "…" : errorText; + console.log(`Cloud sync failed (${response.status}):`, truncated); return { error: "Cloud sync failed" }; }