ActivityPubのHTTPリクエストの強化 (#2820)

* Fix error handling in AP deliver

* Set timeout to resolver

* Tune looks
This commit is contained in:
MeiMei
2018-10-05 01:58:41 +09:00
committed by syuilo
parent baf9b65801
commit f243ce66e7
3 changed files with 24 additions and 13 deletions

View File

@@ -7,6 +7,7 @@ const log = debug('misskey:activitypub:resolver');
export default class Resolver {
private history: Set<string>;
private timeout = 10 * 1000;
constructor() {
this.history = new Set();
@@ -50,6 +51,7 @@ export default class Resolver {
const object = await request({
url: value,
timeout: this.timeout,
headers: {
'User-Agent': config.user_agent,
Accept: 'application/activity+json, application/ld+json'