From 4dfe2c15b0f8f673f349d4b7db70c20fee6d73c4 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 7 May 2023 11:58:08 +0000 Subject: [PATCH] fix(backend): Fix #10786 --- packages/backend/src/server/web/UrlPreviewService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/server/web/UrlPreviewService.ts b/packages/backend/src/server/web/UrlPreviewService.ts index b3e193cd3..e61e92c62 100644 --- a/packages/backend/src/server/web/UrlPreviewService.ts +++ b/packages/backend/src/server/web/UrlPreviewService.ts @@ -70,10 +70,10 @@ export class UrlPreviewService { await summaly(url, { followRedirects: false, lang: lang ?? 'ja-JP', - agent: { + agent: this.config.proxy ? { http: this.httpRequestService.httpAgent, https: this.httpRequestService.httpsAgent, - }, + } : undefined, }); this.logger.succ(`Got preview of ${url}: ${summary.title}`);