From 495d513efdb8b2a996287fd54ae5014832352616 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 6 Jan 2023 13:47:18 +0900 Subject: [PATCH] disable custom emoji proxy temporary https://github.com/misskey-dev/misskey/pull/9431#issuecomment-1373006446 --- packages/backend/src/server/web/ClientServerService.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts index 263b15cc5..9cb0c4b33 100644 --- a/packages/backend/src/server/web/ClientServerService.ts +++ b/packages/backend/src/server/web/ClientServerService.ts @@ -251,6 +251,10 @@ export class ClientServerService { reply.header('Content-Security-Policy', 'default-src \'none\'; style-src \'unsafe-inline\''); + // || emoji.originalUrl してるのは後方互換性のため(publicUrlはstringなので??はだめ) + return await reply.redirect(301, emoji.publicUrl ?? emoji.originalUrl); + + /* https://github.com/misskey-dev/misskey/pull/9431#issuecomment-1373006446 const url = new URL('/proxy/emoji.webp', this.config.url); // || emoji.originalUrl してるのは後方互換性のため(publicUrlはstringなので??はだめ) url.searchParams.set('url', emoji.publicUrl || emoji.originalUrl); @@ -261,6 +265,7 @@ export class ClientServerService { 301, url.toString(), ); + */ }); fastify.get<{ Params: { path: string } }>('/fluent-emoji/:path(.*)', async (request, reply) => {