debug log
This commit is contained in:
parent
48b3372520
commit
0933aba453
|
@ -234,6 +234,7 @@ export class InboxProcessorService implements OnApplicationShutdown {
|
||||||
|
|
||||||
// アクティビティを処理
|
// アクティビティを処理
|
||||||
try {
|
try {
|
||||||
|
this.logger.debug('performing activity', { activityId: activity.id, actorUri: authUser.user.uri, actorId: authUser.user.id, activity });
|
||||||
const result = await this.apInboxService.performActivity(authUser.user, activity);
|
const result = await this.apInboxService.performActivity(authUser.user, activity);
|
||||||
if (result && !result.startsWith('ok')) {
|
if (result && !result.startsWith('ok')) {
|
||||||
this.logger.warn(`inbox activity ignored (maybe): id=${activity.id} reason=${result}`);
|
this.logger.warn(`inbox activity ignored (maybe): id=${activity.id} reason=${result}`);
|
||||||
|
|
|
@ -115,6 +115,7 @@ export class ActivityPubServerService {
|
||||||
@bindThis
|
@bindThis
|
||||||
private async inbox(request: FastifyRequest, reply: FastifyReply) {
|
private async inbox(request: FastifyRequest, reply: FastifyReply) {
|
||||||
if (this.meta.federation === 'none') {
|
if (this.meta.federation === 'none') {
|
||||||
|
this.inboxLogger.debug('federation is disabled');
|
||||||
reply.code(403);
|
reply.code(403);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -148,17 +149,18 @@ export class ActivityPubServerService {
|
||||||
delay: 300_000,
|
delay: 300_000,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (err) {
|
|
||||||
this.inboxLogger.warn('signature header parsing failed', { err });
|
|
||||||
|
|
||||||
|
this.inboxLogger.debug('signature header parsed', { signature, body: request.body });
|
||||||
|
} catch (err) {
|
||||||
if (typeof request.body === 'object' && 'signature' in request.body) {
|
if (typeof request.body === 'object' && 'signature' in request.body) {
|
||||||
// LD SignatureがあればOK
|
// LD SignatureがあればOK
|
||||||
this.queueService.inbox(request.body as IActivity, null);
|
this.queueService.inbox(request.body as IActivity, null);
|
||||||
|
this.inboxLogger.debug('LD Signature found in request body', { err, body: request.body });
|
||||||
reply.code(202);
|
reply.code(202);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.inboxLogger.warn('signature header parsing failed and LD signature not found');
|
this.inboxLogger.warn('signature header parsing failed and LD signature not found', { err });
|
||||||
reply.code(401);
|
reply.code(401);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue