update deps (#14594)
* wip * Update ClientServerService.ts * eslint * Update fetch-resource.ts * wip
This commit is contained in:
@@ -82,7 +82,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();
|
||||
});
|
||||
@@ -147,12 +147,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);
|
||||
@@ -167,7 +167,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,8 +314,8 @@ export class FileServerService {
|
||||
}
|
||||
|
||||
return await reply.redirect(
|
||||
301,
|
||||
url.toString(),
|
||||
301,
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user