fix: ⚡ immediately fail jobs with invalid signature
This commit is contained in:
parent
53dedadc58
commit
e603745f97
1 changed files with 5 additions and 2 deletions
|
@ -35,8 +35,11 @@ export default async (job: Bull.Job<InboxJobData>): Promise<string> => {
|
|||
info["@context"] = undefined;
|
||||
logger.debug(JSON.stringify(info, null, 2));
|
||||
|
||||
if (!signature?.keyId) return `Invalid signature: ${signature}`;
|
||||
|
||||
if (!signature?.keyId) {
|
||||
const err = `Invalid signature: ${signature}`;
|
||||
job.moveToFailed({message: err});
|
||||
return err;
|
||||
}
|
||||
//#endregion
|
||||
const host = toPuny(new URL(signature.keyId).hostname);
|
||||
|
||||
|
|
Loading…
Reference in a new issue