mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 13:59:16 +01:00
feat(config): ✨ Add support for HTTP proxies on outgoing requests
This commit is contained in:
parent
0ecb65de29
commit
b8b822e553
13 changed files with 225 additions and 136 deletions
|
|
@ -595,6 +595,7 @@ export class Note extends BaseInterface<typeof Notes, StatusWithRelations> {
|
|||
headers: {
|
||||
Accept: "application/json",
|
||||
},
|
||||
proxy: config.http.proxy.address,
|
||||
});
|
||||
|
||||
note = await new EntityValidator().Note(await response.json());
|
||||
|
|
|
|||
|
|
@ -253,6 +253,7 @@ export class User extends BaseInterface<typeof Users, UserWithRelations> {
|
|||
headers: {
|
||||
Accept: "application/json",
|
||||
},
|
||||
proxy: config.http.proxy.address,
|
||||
});
|
||||
|
||||
const json = (await response.json()) as Partial<LysandUser>;
|
||||
|
|
@ -551,7 +552,9 @@ export class User extends BaseInterface<typeof Users, UserWithRelations> {
|
|||
);
|
||||
|
||||
// FIXME: Add to new queue system when it's implemented
|
||||
fetch(federationRequest);
|
||||
fetch(federationRequest, {
|
||||
proxy: config.http.proxy.address,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue