Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update verify-qstash.ts

Kiran Ked335ab4963b
diff --git a/apps/web/lib/cron/verify-qstash.ts b/apps/web/lib/cron/verify-qstash.ts
index 64f3a5efeb..0a37e43819 100644
--- a/apps/web/lib/cron/verify-qstash.ts
+++ b/apps/web/lib/cron/verify-qstash.ts
@@ -1,3 +1,4 @@
+import { log } from "@dub/utils";
import { Receiver } from "@upstash/qstash";
import { DubApiError } from "../api/errors";
@@ -29,6 +30,15 @@ export const verifyQstashSignature = async ({
});
if (!isValid) {
+ const url = req.url;
+ const messageId = req.headers.get("Upstash-Message-Id");
+
+ log({
+ message: `Invalid QStash request signature: *${url}* - *${messageId}*`,
+ type: "errors",
+ mention: true,
+ });
+
throw new DubApiError({
code: "unauthorized",
message: "Invalid QStash request signature.",