From 6a4ed3a3ea4a1f3548524f5c758fc65792459239 Mon Sep 17 00:00:00 2001 From: Ada Date: Wed, 4 Dec 2024 19:51:43 +0000 Subject: [PATCH 1/3] Fix Content-Length resetting for partial content length requests --- packages/backend/src/server/FileServerService.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/server/FileServerService.ts b/packages/backend/src/server/FileServerService.ts index a4d0588fbe..18d313db06 100644 --- a/packages/backend/src/server/FileServerService.ts +++ b/packages/backend/src/server/FileServerService.ts @@ -192,6 +192,9 @@ export class FileServerService { } } + // set Content-Length before we chunk, so it can properly override when chunking. + reply.header('Content-Length', file.file.size); + if (!image) { if (request.headers.range && file.file.size > 0) { const range = request.headers.range as string; @@ -235,7 +238,6 @@ export class FileServerService { } reply.header('Content-Type', FILE_TYPE_BROWSERSAFE.includes(image.type) ? image.type : 'application/octet-stream'); - reply.header('Content-Length', file.file.size); reply.header('Cache-Control', 'max-age=31536000, immutable'); reply.header('Content-Disposition', contentDisposition( From 570d19b7385d15cf7642d960cf11695be8877300 Mon Sep 17 00:00:00 2001 From: Marie Date: Fri, 6 Dec 2024 11:57:51 +0000 Subject: [PATCH 2/3] chore: fix link to point to the proper location --- packages/frontend/src/pages/admin/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/pages/admin/index.vue b/packages/frontend/src/pages/admin/index.vue index e8d123060a..d6cd1f0fb1 100644 --- a/packages/frontend/src/pages/admin/index.vue +++ b/packages/frontend/src/pages/admin/index.vue @@ -15,7 +15,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.thereIsUnresolvedAbuseReportWarning }} {{ i18n.ts.check }} {{ i18n.ts.noMaintainerInformationWarning }} {{ i18n.ts.configure }} - {{ i18n.ts.noInquiryUrlWarning }} {{ i18n.ts.configure }} + {{ i18n.ts.noInquiryUrlWarning }} {{ i18n.ts.configure }} {{ i18n.ts.noBotProtectionWarning }} {{ i18n.ts.configure }} {{ i18n.ts.noEmailServerWarning }} {{ i18n.ts.configure }} {{ i18n.ts.pendingUserApprovals }} {{ i18n.ts.check }} From 57deef320e5892be1b4214eb3805e40a439c83c0 Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Wed, 27 Nov 2024 22:10:50 -0500 Subject: [PATCH 3/3] restore functionality of `MK_NO_DAEMONS` option --- packages/backend/src/boot/common.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/backend/src/boot/common.ts b/packages/backend/src/boot/common.ts index 268c07582d..ad59a55688 100644 --- a/packages/backend/src/boot/common.ts +++ b/packages/backend/src/boot/common.ts @@ -12,6 +12,7 @@ import { QueueStatsService } from '@/daemons/QueueStatsService.js'; import { ServerStatsService } from '@/daemons/ServerStatsService.js'; import { ServerService } from '@/server/ServerService.js'; import { MainModule } from '@/MainModule.js'; +import { envOption } from '@/env.js'; export async function server() { const app = await NestFactory.createApplicationContext(MainModule, { @@ -23,6 +24,8 @@ export async function server() { if (process.env.NODE_ENV !== 'test') { app.get(ChartManagementService).start(); + } + if (!envOption.noDaemons) { app.get(QueueStatsService).start(); app.get(ServerStatsService).start(); }