Skip to content

Commit

Permalink
fix(backend): URLをデコードしてからリクエストを送信するように
Browse files Browse the repository at this point in the history
  • Loading branch information
AmaseCocoa authored Nov 21, 2024
1 parent a21a2c5 commit edc8d70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/backend/src/server/api/endpoints/fetch-rss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Parser from 'rss-parser';
import { Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js';
import { HttpRequestService } from '@/core/HttpRequestService.js';
import { URL } from 'url';

const rssParser = new Parser();

Expand Down Expand Up @@ -219,7 +220,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private httpRequestService: HttpRequestService,
) {
super(meta, paramDef, async (ps, me) => {
const res = await this.httpRequestService.send(ps.url, {
const res = await this.httpRequestService.send(decodeURIComponent(ps.url), {
method: 'GET',
headers: {
Accept: 'application/rss+xml, */*',
Expand Down

0 comments on commit edc8d70

Please sign in to comment.