mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-25 00:49:17 +09:00
fix(backend): HttpRequestService.sendでURLをデコードしてからリクエストを送信するように
HttpRequestService側で処理するように変更しました。意図していたものとは異なる可能性もありますが...
This commit is contained in:
parent
c488ba03b7
commit
e9ee83fccd
@ -283,6 +283,7 @@ export class HttpRequestService {
|
||||
},
|
||||
): Promise<Response> {
|
||||
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,
|
||||
});
|
||||
|
||||
|
@ -220,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(decodeURIComponent(ps.url), {
|
||||
const res = await this.httpRequestService.send(ps.url, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
Accept: 'application/rss+xml, */*',
|
||||
|
Loading…
Reference in New Issue
Block a user