From 7cb13cf83956b534f806bc6d622e3d4d720d5c9e Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 26 Jan 2023 18:44:43 +0900 Subject: [PATCH] =?UTF-8?q?proxyRemoteFiles=E3=81=8Cfalse=E3=81=AA?= =?UTF-8?q?=E3=82=89=E3=83=AA=E3=83=A2=E3=83=BC=E3=83=88=E3=82=AB=E3=82=B9?= =?UTF-8?q?=E3=82=BF=E3=83=A0=E7=B5=B5=E6=96=87=E5=AD=97=E3=81=AF=E7=9B=B4?= =?UTF-8?q?=E3=83=AA=E3=83=B3=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/CustomEmojiService.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/core/CustomEmojiService.ts b/packages/backend/src/core/CustomEmojiService.ts index 2610ad569..39814e1be 100644 --- a/packages/backend/src/core/CustomEmojiService.ts +++ b/packages/backend/src/core/CustomEmojiService.ts @@ -117,7 +117,11 @@ export class CustomEmojiService { const isLocal = emoji.host == null; const emojiUrl = emoji.publicUrl || emoji.originalUrl; // || emoji.originalUrl してるのは後方互換性のため(publicUrlはstringなので??はだめ) - const url = isLocal ? emojiUrl : `${this.config.url}/proxy/${encodeURIComponent((new URL(emojiUrl)).pathname)}?${query({ url: emojiUrl })}`; + const url = isLocal + ? emojiUrl + : this.config.proxyRemoteFiles + ? `${this.config.url}/proxy/${encodeURIComponent((new URL(emojiUrl)).pathname)}?${query({ url: emojiUrl })}` + : emojiUrl; return url; }