From 1c84b19f246ebe6d3cad4f56726013147756d9c3 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Fri, 10 Oct 2025 21:19:00 +0300 Subject: [PATCH] Show console.log 'Legacy attachments route loaded' only when environment variable DEBUG=true. Thanks to xet7 ! --- server/routes/legacyAttachments.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/routes/legacyAttachments.js b/server/routes/legacyAttachments.js index a208fe1d1..111546c66 100644 --- a/server/routes/legacyAttachments.js +++ b/server/routes/legacyAttachments.js @@ -4,7 +4,9 @@ import { ReactiveCache } from '/imports/reactiveCache'; import { getAttachmentWithBackwardCompatibility, getOldAttachmentStream } from '/models/lib/attachmentBackwardCompatibility'; // Ensure this file is loaded -console.log('Legacy attachments route loaded'); +if (process.env.DEBUG === 'true') { + console.log('Legacy attachments route loaded'); +} /** * Legacy attachment download route for CollectionFS compatibility