update node-http-message-signatures
This commit is contained in:
parent
65fa25a208
commit
86c9f0b0fb
3 changed files with 6 additions and 11 deletions
|
|
@ -101,7 +101,7 @@ export class ActivityPubServerService {
|
|||
|
||||
@bindThis
|
||||
private inbox(request: FastifyRequest, reply: FastifyReply) {
|
||||
let signature;
|
||||
let signature: ReturnType<typeof parseRequestSignature>;
|
||||
|
||||
const verifyDigest = verifyDigestHeader(request.raw, request.rawBody || '', true);
|
||||
if (!verifyDigest) {
|
||||
|
|
@ -116,11 +116,6 @@ export class ActivityPubServerService {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!signature) {
|
||||
reply.code(401);
|
||||
return;
|
||||
}
|
||||
|
||||
if (signature.value.params.headers.indexOf('host') === -1
|
||||
|| request.headers.host !== this.config.host) {
|
||||
// Host not specified or not match.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue