Skip to content

Commit

Permalink
disable custom emoji proxy temporary
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo committed Jan 6, 2023
1 parent 3b617fa commit 495d513
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/backend/src/server/web/ClientServerService.ts
Expand Up @@ -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);
Expand All @@ -261,6 +265,7 @@ export class ClientServerService {
301,
url.toString(),
);
*/
});

fastify.get<{ Params: { path: string } }>('/fluent-emoji/:path(.*)', async (request, reply) => {
Expand Down

0 comments on commit 495d513

Please sign in to comment.