Webhook
Abyss Storage can notify you when someone use your PreSignUrl.
info
Before using Webhook, you have to configure it from the Storage dashboard of your application.
Validate Webhook Signature
To secure the Webhook origin, every webhook are signed using an HMAC signature.
info
You can copy and reset your signature secret from the Dashboard interface.
const headerSignature = req.headers[HEADER_SIGNATURE_NAME];
const hmac = crypto.createHmac(
SIGNATURE_ALGORITHM,
"my-secret-signature",
);
const signature = hmac.update(JSON.stringify(req.body)).digest('hex');
if (headerSignature !== signature) {
// Throw an error
throw new Error('Invalid Signature');
}
// The signature is correct
info
All typing of webhook content are available on Core Package
Webhook failure
On multiple failure, the webhook will automatically be disabled. You can turn it on at any time from your dashboard. You will get notified and you can check the Webhook History to debug it.