Merge pull request #10 from diegosouzapw/fix/cloud-sync-404-spam

fix(sync): disable cloud sync and truncate error logs
This commit is contained in:
Diego Rodrigues de Sa e Souza
2026-02-13 19:01:53 -03:00
committed by GitHub
2 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -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" };
}