woops put headernames in wrong place
This commit is contained in:
parent
6ada10a340
commit
e80fdbfaf2
|
@ -6,7 +6,7 @@ declare module "activitypub-express" {
|
|||
// Only enough here for what I need.
|
||||
declare module "activitypub-http-signatures" {
|
||||
export class Sha256Signer {
|
||||
constructor(options: { publicKeyId: string, privateKey: string }, headerNames?: string[]);
|
||||
constructor(options: { publicKeyId: string, privateKey: string, headerNames?: string[] });
|
||||
|
||||
sign: (options: { url: string, method: string, headers: any[] }) => string;
|
||||
};
|
||||
|
|
|
@ -45,8 +45,9 @@ export const signedFetch = async (url: string, init: RequestInit, signedInit: Si
|
|||
|
||||
const signer = new Sha256Signer({
|
||||
privateKey: signedInit.privateKey,
|
||||
publicKeyId: signedInit.keyId
|
||||
}, headerNames);
|
||||
publicKeyId: signedInit.keyId,
|
||||
headerNames
|
||||
});
|
||||
|
||||
const signature = signer.sign({
|
||||
url,
|
||||
|
|
Loading…
Reference in New Issue