From 6caec5b8e2b8a4fdd0413ae8d6de83ce4c25ad53 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 3 Feb 2022 21:43:53 +0900 Subject: [PATCH] refactor --- packages/backend/src/remote/activitypub/misc/ld-signature.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/remote/activitypub/misc/ld-signature.ts b/packages/backend/src/remote/activitypub/misc/ld-signature.ts index 946914bfaa..3b799c755c 100644 --- a/packages/backend/src/remote/activitypub/misc/ld-signature.ts +++ b/packages/backend/src/remote/activitypub/misc/ld-signature.ts @@ -24,7 +24,7 @@ export class LdSignature { } as { type: string; creator: string; - domain: string; + domain?: string; nonce: string; created: string; }; @@ -114,7 +114,7 @@ export class LdSignature { Accept: 'application/ld+json, application/json', }, timeout: this.loderTimeout, - agent: u => u.protocol == 'http:' ? httpAgent : httpsAgent, + agent: u => u.protocol === 'http:' ? httpAgent : httpsAgent, }).then(res => { if (!res.ok) { throw `${res.status} ${res.statusText}`;