diff --git a/packages/backend/src/core/HttpRequestService.ts b/packages/backend/src/core/HttpRequestService.ts index 083153940a..0a23202381 100644 --- a/packages/backend/src/core/HttpRequestService.ts +++ b/packages/backend/src/core/HttpRequestService.ts @@ -283,6 +283,7 @@ export class HttpRequestService { }, ): Promise { const timeout = args.timeout ?? 5000; + const decodedUrl = decodeURIComponent(url); const controller = new AbortController(); setTimeout(() => { @@ -299,7 +300,7 @@ export class HttpRequestService { }, body: args.body, size: args.size ?? 10 * 1024 * 1024, - agent: (url) => this.getAgentByUrl(url, false, isLocalAddressAllowed), + agent: (decodedUrl) => this.getAgentByUrl(decodedUrl, false, isLocalAddressAllowed), signal: controller.signal, }); diff --git a/packages/backend/src/server/api/endpoints/fetch-rss.ts b/packages/backend/src/server/api/endpoints/fetch-rss.ts index ae6ad1b9dc..562092ea07 100644 --- a/packages/backend/src/server/api/endpoints/fetch-rss.ts +++ b/packages/backend/src/server/api/endpoints/fetch-rss.ts @@ -220,7 +220,7 @@ export default class extends Endpoint { // eslint- private httpRequestService: HttpRequestService, ) { super(meta, paramDef, async (ps, me) => { - const res = await this.httpRequestService.send(decodeURIComponent(ps.url), { + const res = await this.httpRequestService.send(ps.url, { method: 'GET', headers: { Accept: 'application/rss+xml, */*',