mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-20 23:40:10 +00:00
Merge branch 'develop' into feature/2024.10
# Conflicts: # packages/frontend/src/pages/admin/index.vue
This commit is contained in:
commit
3864d1dacf
2 changed files with 6 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue