Merge remote-tracking branch 'misskey/master' into feature/2024.9.0
This commit is contained in:
commit
f00576bce6
564 changed files with 19993 additions and 8169 deletions
|
|
@ -80,7 +80,7 @@ export class FileServerService {
|
|||
.catch(err => this.errorHandler(request, reply, err));
|
||||
});
|
||||
fastify.get<{ Params: { key: string; } }>('/files/:key/*', async (request, reply) => {
|
||||
return await reply.redirect(301, `${this.config.url}/files/${request.params.key}`);
|
||||
return await reply.redirect(`${this.config.url}/files/${request.params.key}`, 301);
|
||||
});
|
||||
done();
|
||||
});
|
||||
|
|
@ -145,12 +145,12 @@ export class FileServerService {
|
|||
url.searchParams.set('static', '1');
|
||||
|
||||
file.cleanup();
|
||||
return await reply.redirect(301, url.toString());
|
||||
return await reply.redirect(url.toString(), 301);
|
||||
} else if (file.mime.startsWith('video/')) {
|
||||
const externalThumbnail = this.videoProcessingService.getExternalVideoThumbnailUrl(file.url);
|
||||
if (externalThumbnail) {
|
||||
file.cleanup();
|
||||
return await reply.redirect(301, externalThumbnail);
|
||||
return await reply.redirect(externalThumbnail, 301);
|
||||
}
|
||||
|
||||
image = await this.videoProcessingService.generateVideoThumbnail(file.path);
|
||||
|
|
@ -165,7 +165,7 @@ export class FileServerService {
|
|||
url.searchParams.set('url', file.url);
|
||||
|
||||
file.cleanup();
|
||||
return await reply.redirect(301, url.toString());
|
||||
return await reply.redirect(url.toString(), 301);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -312,8 +312,8 @@ export class FileServerService {
|
|||
}
|
||||
|
||||
return await reply.redirect(
|
||||
301,
|
||||
url.toString(),
|
||||
301,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue