From 6780cf3261bd147ef4ca91622701391dde7cca2a Mon Sep 17 00:00:00 2001 From: Administrator Date: Sat, 11 Apr 2026 15:09:13 +0200 Subject: [PATCH] fix(clouddrop): route chunk PUTs via upload.clouddrop.cc (bypass CF) Only the 16 MB chunk stream needs the upload subdomain; init and complete are tiny and can stay on the main host. --- lib/clouddrop-upload.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/clouddrop-upload.js b/lib/clouddrop-upload.js index 56fe3d3..16a57c0 100644 --- a/lib/clouddrop-upload.js +++ b/lib/clouddrop-upload.js @@ -5,6 +5,7 @@ const { request, Agent } = require('undici'); const BASE_URL = 'https://clouddrop.cc'; const API_BASE = `${BASE_URL}/api/cloud`; +const CHUNK_UPLOAD_BASE = 'https://upload.clouddrop.cc/api/cloud'; const USER_AGENT = 'multi-hoster-uploader/1.0'; const SIMPLE_UPLOAD_LIMIT = 16 * 1024 * 1024; // 16 MB @@ -169,7 +170,7 @@ class ClouddropUploader { if (throttle) await throttle.consume(thisChunkSize, signal); - const chunkRes = await request(`${API_BASE}/upload/${sessionId}/chunk/${i}`, { + const chunkRes = await request(`${CHUNK_UPLOAD_BASE}/upload/${sessionId}/chunk/${i}`, { method: 'PUT', dispatcher: clouddropAgent, signal,